You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by hugh williams <hu...@soco.agilent.com> on 2008/12/04 17:53:08 UTC
[users@httpd] Re: Run Apache as Non Root user on port other than 80
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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
Hugh Williams "More men are killed by overwork than the
hugh_williams@agilent.com 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: Run Apache as Non Root user on port other than
80
Posted by André Warnier <aw...@ice-sa.com>.
hugh williams wrote:
[...]
And yet another possibility, technically speaking.
It is not secure in a general sense, and your sysadmins might not like
it at all for good reasons. So this is not a recommendation, it is just
to indicate what is possible technically.
When Apache starts and reads its configuration file (apache2.conf or
httpd.conf or whatever it is named in your case), this file can contain
"Include" directives to include other files in the configuration.
It would thus be a possibility to have such an "include" file, called
from the main conf file, but residing somewhere else and having
permissions such that you (and preferably you alone) can edit it.
Then you would still have to ask your sysadmins to restart Apache when
there is a change in the file, but you would not have to ask them for more.
For example, this file could contain a VirtualHost section, defining a
particular Vhost that has the DNS name that you wish to tailor to your
needs. There are some limitations as to what you could in there (*),
but it would still give you wide customisation possibilities.
Again, not a real suggestion, and don't tell anyone that I even
mentioned this.
(*) for example, you could not use a module that is not loaded in the
main configuration section, or have this VHost listen on a port not
opened in the main config.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org