spy_X Posted November 19, 2006 Share Posted November 19, 2006 Hey all,I am having a problem with my virtual host with apache. I do think i have everything rightand is working as far as the virtual setup goes.. (port 80 is blocked by ISP, using 81)Also, im using Apache, 1.3.37.example:http://webmail.domain.net:81 --> goes right to /var/www/htdocs/webmailhttp://www.domain.net:81 --> goes right to /var/ww/htdocs (main page)but the problem is... when i use the following,http://domain.net:81 --> it goes right to the same page as webmail.Im not sure what i can do to fix it.I have included parts of the httpd.conf, can someoneplease check it over and see if i made any typo's that wouldstop the http://domain.net/ from going to the httpd root dir.Thanks in advance!!----------------cut--------------### Section 1: Global EnvironmentServerType standaloneServerRoot "/usr"PidFile /var/run/httpd.pidScoreBoardFile /var/run/httpd.scoreboardTimeOut 300KeepAlive onMaxKeepAliveRequests 100KeepAliveTimeout 15MinSpareServers 5MaxSpareServers 10StartServers 5MaxClients 150MaxRequestsPerChild 0Listen 81### Section 2: 'Main' server configurationPort 81User nobodyGroup nobodyServerAdmin admin@domain.netServerName www.domain.netDocumentRoot "/var/www/htdocs"<Directory /> Options FollowSymLinks AllowOverride None</Directory><Directory "/var/www/htdocs"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all</Directory><IfModule mod_userdir.c> UserDir public_html</IfModule><Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept></Directory><IfModule mod_dir.c> DirectoryIndex index.html index.htm index.shtml index.shtm index.php</IfModule> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory>### Section 3: Virtual HostsNameVirtualHost *:81<VirtualHost *>ServerName webmail.domain.netDocumentRoot /var/www/htdocs/webmail</VirtualHost><VirtualHost *>ServerName www.domain.netDocumentRoot /var/www/htdocs/</VirtualHost>-----------------/cut---------------------------- Quote Link to comment Share on other sites More sharing options...
remmargorp Posted November 20, 2006 Share Posted November 20, 2006 It's using the webmail domain because it becomes the "default domain". The default domain is the first one specified.Try changing it to:--------------------------------NameVirtualHost *:81<VirtualHost *>ServerName www.domain.netDocumentRoot /var/www/htdocs/</VirtualHost><VirtualHost *>ServerName webmail.domain.netDocumentRoot /var/www/htdocs/webmail</VirtualHost>--------------------------------Putting the www.domain.net virtualhost first, this would make it the default domain.You could also add a virtualhost for servername domain.net, and it would use that, I would suggest changing the www.domain.net to be the default domain Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.