Re: Run Apache as Non Root user on port other than 80

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello;

One other possibility is, if your administrators don't want to manage your Apache setup, perhaps they can be persuaded to manage their own Apache, a very simple one (which you could build, configure, and deliver to them). This additional server instance would do nothing except forward all requests on to your 9080/alternate-443 instance, either via mod_proxy or mod_rewrite or plain old 'RedirectMatch permanent'. The reluctant admins have a fairly static, minimalist web server instance to deal with (no CGI, no htdocs, and so forth), people can use the un-port-labeled URLs to get in, and you still get to control all the rest; Andre's suggestions below would still be applicable.

Good luck with your administrative group!

hugh

André Warnier wrote:
Vasanth Kumar ravi wrote:
So i have changed the Listen port as 9080 and defined Virtual hosts for 9080
and 443.
I tried to access the application using the url's above, but it failed.

Now the question is.

How can I access the application using the same url without mentioning the
port number on the url.
I m not using any firewall here, so I cannot do a port fwd of 80 to 9080.

Is there any configuration which can be done at the Apache, so that I can run it as non root user and access the url without ports mentioned in it.

Hi.
Apart from the correct answers which other people already gave you, going back for a minute to your basic question :

You cannot do the above without having something in-between, for the following reason :

When you type a URL like "http://www.myserver.com"; in a browser, it is *the browser* which adds the ":80" automatically (*), because that is the default port for the HTTP protocol. Similarly, if you type a URL like "https://www.myserver.com";, the browser will automatically add ":443", because that is the default port for the HTTPS protocol.

So now, the browser tries to connect to the IP address of the host "www.myserver.com", on port 80. If on that host, nothing is listening on that port, the browser is not able to connect.

Since you cannot "tell" all the browsers that access your site, that they should use another default port for HTTP and HTTPS, there is no way to change that part.

But note :
If your application is entirely located on that one server, the fact of having to add ":9080" to the hostname concerns only the *first* URL link to your site. Once your clients have connected once to "http://www.myserver.com:9080"; and received the Home page, then as long as all the links in your application pages do not contain the "http://www.myserver.com:9080"; part anymore, the browser will automatically continue to access this same host:port.
(e.g. the links in your Home page are like
<a href="/submenu1.html">Accounting</a>
and not like
<a href="http://www.myserver.com:9080/submenu1.html";>Accounting</a>
)
This may, or may not, be acceptable to you. You will have to be a bit careful in designing your site, but it can work.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



--
Hugh Williams                  "More men are killed by overwork than the
hugh_williams@xxxxxxxxxxx       importance of the world justifies."
Agilent Technologies                           - Rudyard Kipling
Santa Rosa 4US-R                             "The Phantom Rickshaw", 1888
(707)-577-4941



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux