NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
lkeagle
Sep 08, 2009Follower
Apache Virtual Host inherits default server Alias/Locations
I'm trying to configure the apache server in my Duo to support named virtual hosts from the internet. What I want is to allow my Public share to be served by the _default_:80 VirtualHost and be password protected, but I also want to be able to set up a specific directory to be served as a different ServerName on my domain. The problem I am seeing is that because of the way the Duo is configured, my virtual hosts inherit all of the Aliased locations from the main server.
Here is an example:
http://www.mydomain.org/ redirects to http://www.mydomin.org/Public because of the rewrite rules in the _default_ virtual host.
http://otherhost.mydomain.org/ serves files from /c/OtherHost (not necessarily a shared directory. Contains some symbolic links to other shared directories, however).
My problem is this:
http://otherhost.mydomain.org/Public still shares the Public folder, and I assume that all of the other shares are available in the same manner, as well as /admin, /password_reset, and everything else Aliased with <Location> tags in the main server.
This sort of goes against the idea that otherhost.mydomain.org be viewed as an isolated virtual server if it picks up all the shares of the main server. Is there any way to reconfigure my new virtual host such that it ignores all of the aliases and shares created in the main server?
I realize this may be complicated due to the fact that the Shares.conf file seems to be autogenerated. Otherwise I would just move all of the Alias and Location directives into my default VirtualHost and be done with it, but that doesn't solve how to hide the Shares.conf Aliases from otherhost.mydomain.org.
Here is the relevant VirtualHost sections in my Virtual.conf file:
Any help is appreciated,
~Loren
Here is an example:
http://www.mydomain.org/ redirects to http://www.mydomin.org/Public because of the rewrite rules in the _default_ virtual host.
http://otherhost.mydomain.org/ serves files from /c/OtherHost (not necessarily a shared directory. Contains some symbolic links to other shared directories, however).
My problem is this:
http://otherhost.mydomain.org/Public still shares the Public folder, and I assume that all of the other shares are available in the same manner, as well as /admin, /password_reset, and everything else Aliased with <Location> tags in the main server.
This sort of goes against the idea that otherhost.mydomain.org be viewed as an isolated virtual server if it picks up all the shares of the main server. Is there any way to reconfigure my new virtual host such that it ignores all of the aliases and shares created in the main server?
I realize this may be complicated due to the fact that the Shares.conf file seems to be autogenerated. Otherwise I would just move all of the Alias and Location directives into my default VirtualHost and be done with it, but that doesn't solve how to hide the Shares.conf Aliases from otherhost.mydomain.org.
Here is the relevant VirtualHost sections in my Virtual.conf file:
NameVirtualHost *:80
<VirtualHost _default_:80>
SSLEngine off
RewriteEngine on
RewriteRule ^/$ /Public [R,L]
RewriteRule ^/admin/(.*)$ https://%{SERVER_NAME}/admin/$1 [R,L]
</VirtualHost>
<VirtualHost *:80>
SSLEngine off
RewriteEngine off
ServerName otherhost.mydomain.org
DocumentRoot /c/OtherHost
ErrorLog /var/log/frontview/error.otherhost.log
<Directory "/c/OtherHost">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Any help is appreciated,
~Loren
1 Reply
Replies have been turned off for this discussion
- placid2000AspirantHello Loren
I'm encountering the same issue.
Were you able to find a solution? Could you help me out?
Thx in advance
Cyril
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!