Answer the question
In order to leave comments, you need to log in
How to set up a 3rd level domain on Apache?
Hello!
The task is to set up a 3rd level domain on the Apache web server
Available:
windows 2003 OS;
Apache 2.2.4;
DNS service;
Already configured and working site;
What has been done:
The httpd.conf file contains, among other things:
ServerRoot "C:/web/Apache"
Listen 80
ServerName server.yarrsk.ru:80
DocumentRoot "C:/web/htdocs"
<Directory "C:/web/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Include conf/extra/httpd-vhosts.conf
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot "C:/web/htdocs"
ServerName yarrsk.ru
ServerPath "C:/web/htdocs"
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot "C:/web/htdocs_old"
ServerName old.yarrsk.ru
ServerPath "C:/web/htdocs_old"
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
1. did you restart apache?
2. 127.0.0.1:80 - try replacing it with external_ip_server:80
3. The root directory in httpd.conf is C:/web/htdocs, while old.yarrsk.ru's DocumentRoot refers to C:/web/htdocs_old, as an option, try move htdocs_old - to folder C:/web/htdocs, reconfigure virtual hosts for example:
NameVirtualHost external_server_ip:80
DocumentRoot "C:/web/htdocs/new"
ServerName yarrsk.ru
ServerPath "C:/web/htdocs/new"
DocumentRoot " C:/web/htdocs/old"
ServerName old.yarrsk.ru
ServerPath "C:/web/htdocs/old"
Apache restart!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question