F
F
Fiasco2013-11-20 07:42:33
Apache HTTP Server
Fiasco, 2013-11-20 07:42:33

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>

httpd.conf file - line uncommented:
Include conf/extra/httpd-vhosts.conf
httpd-vhosts.conf file contains:
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>

The DNS service is configured as follows:
Forward lookup zone yarrsk.ru created, node A named old created in it
. web/htdocs_old" Tell me
what could be the problem. Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Kostyukov, 2013-11-20
@Fiasco

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!

F
Fiasco, 2013-11-20
@Fiasco

yeah, the problem was at 127.0.0.1:80, I registered the domain name:

<VirtualHost yarrsk.ru:80>
...
</VirtualHost>
<VirtualHost old.yarrsk.ru:80>
...
</VirtualHost>

and everything worked
thanks!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question