Incorrect subdomains configuration under apache?
In my server i have to different domains running successfully.
Now I want to define a new subdomain under one of theses domains. Running apache2ctl –S in order to see Virtual host defined, we get: apache2: Could not reliably determine the server's fully qualified domain name, using 10.70.220.1 for ServerName VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:443 www.domain1.org (/etc/apache2/sites-enabled/000-default:59) *:80 is a NameVirtualHost default server www.domain1.org (/etc/apache2/sites-enabled/000-default:2) port 80 namevhost www.domain1.org (/etc/apache2/sites-enabled/000-default:2) port 80 namevhost subx.domain1.org (/etc/apache2/sites-enabled/000-default:48) port 80 namevhost www.domain2.org (/etc/apache2/sites-enabled/000-default:54) Syntax OK It looks like virtual host are ok. When I try to browse to domain1.org or domain2.org everything is ok. The problem is when I try to brose to subdomain subx.domain1.org. This subdomain is not working properly. I´m sure something is missing but I don’t know what. Server version: Apache/2.2.3 Server built: Sep 8 2008 09:03:05 Thanks Detailed Virtual Host Definitions ================================= NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.domain1.org DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place #RedirectMatch ^/$ /apache2-default/ </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature Off Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/subx ServerName subx.domain1.org </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/domain2 ServerName www.domain2.org.ve </VirtualHost> |
Quote:
Apache config looks good, so it could be a dns issue, but without further details it's difficult to guess Regards |
Quote:
|
Quote:
|
Quote:
[Sat Apr 07 10:10:15 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:11:50 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:12:27 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/den...icios-publicos [Sat Apr 07 10:12:55 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:13:04 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/den...-defensoriales [Sat Apr 07 10:13:52 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:14:10 2012] [error] [client 200.35.86.132] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/ins...rias-estadales [Sat Apr 07 10:17:12 2012] [error] [client 190.204.233.200] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:25:53 2012] [error] [client 190.204.233.200] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:26:06 2012] [error] [client 190.204.233.200] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:26:37 2012] [error] [client 190.204.233.200] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:29:45 2012] [error] [client 74.125.158.85] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/com...iar-al-pueblo- [Sat Apr 07 10:40:20 2012] [error] [client 186.92.241.69] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:41:20 2012] [error] [client 186.92.241.69] File does not exist: /var/www/favicon.ico [Sat Apr 07 10:42:46 2012] [error] [client 186.24.138.9] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:43:37 2012] [error] [client 200.44.46.7] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:44:14 2012] [error] [client 200.44.46.7] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:44:39 2012] [error] [client 201.208.32.17] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/templates/it_...te_css.css.php [Sat Apr 07 10:44:55 2012] [error] [client 186.92.241.69] File does not exist: /var/www/favicon.ico [Sat Apr 07 10:45:06 2012] [error] [client 46.25.191.214] File does not exist: /var/www/lista.asp, referer: http://www.pearltrees.com/ [Sat Apr 07 10:45:23 2012] [alert] [client 199.21.99.67] /var/www/.htaccess: Option FollowSymLinks not allowed here [Sat Apr 07 10:45:25 2012] [alert] [client 199.21.99.67] /var/www/.htaccess: Option FollowSymLinks not allowed here [Sat Apr 07 10:45:35 2012] [error] [client 186.92.241.69] File does not exist: /var/www/favicon.ico [Sat Apr 07 10:45:40 2012] [error] [client 186.70.80.24] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/den...icios-publicos [Sat Apr 07 10:46:46 2012] [error] [client 186.92.241.69] File does not exist: /var/www/favicon.ico [Sat Apr 07 10:46:56 2012] [error] [client 186.92.241.69] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/publicaciones [Sat Apr 07 10:47:53 2012] [error] [client 186.92.150.155] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:48:26 2012] [error] [client 186.91.91.45] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/ [Sat Apr 07 10:56:47 2012] [error] [client 186.92.241.69] File does not exist: /var/www/dp/templates/it_union/images/content_texture_t.jpg, referer: http://www.domain1.org/index.php/com...t/article/1457 |
Huh, I don't see any reference to subx.domain1.org in these logs. You should post the logs related to the not working subdomain.
Or add: Code:
CustomLog /var/log/apache2/subx-access.log combined |
Quote:
<VirtualHost *:80> ServerName subx.domain.org DocumentRoot /var/www/subx ErrorLog /var/log/apache2/error_esc.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn ServerSignature Off </VirtualHost> |
So you say that you visit http://subx.domain.org, you get a 404 error and you get nothing logged!
Are you sure you're visiting the right vhost? What gives Code:
nslookup subx.domain.org |
Quote:
Server: 190.9.128.11 Address: 190.9.128.11#53 ** server can't find subx.domain.org: NXDOMAIN If I visit http://www.domain1.org/subx the browser redirect to http://www.domain1.org |
Quote:
Quote:
|
Quote:
Thanks |
Quote:
Code:
subx.domain.org. IN A x.x.x.x |
All times are GMT -5. The time now is 01:44 AM. |