web page with 'www1' extension ?
Dear Friend,
I have to create in my RHEL 5 server a website called "http://server.example.com/" . But now I want rename it as "http://www1.server.example.com/" . How can I add this 'www1' in my web page's url ? Plz tell me the procedure ? |
You have an option called ServerName. Use that option to specify it also make sure you have a working DNS that will resolve it or make the changes in /etc/hosts file.
|
web page with 'www1' extension
Thx Friend ,
Actually I already try to use the following lines : # # ServerName www.example.com:80 ServerName www1.server.example.com:80 But the page cannot be displayed . But when I use just "server.example.com" then it is working . My web server is my DNS server and my /etc/hosts is : [root@localhost ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.0.244 www1.server.example.com do u plz tell me where is the problem ? |
Did you restart Apache?
|
web page with 'www1' extension ?
Yes friend , I restart apache several times .. ..
|
1. Edit your /etc/httpd/conf/httpd.conf
<VirtualHost 192.168.0.244:80> DocumentRoot /var/www/html ServerName www.server.example.com ServerAlias www1.server.example.com </VirtualHost> 2. Restart httpd service 3. edit /etc/hosts 192.168.0.244 www.server.example.com www1.server.example.com It is working fine in my configuration Try this ..... |
All times are GMT -5. The time now is 05:01 AM. |