LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   web page with 'www1' extension ? (https://www.linuxquestions.org/questions/linux-newbie-8/web-page-with-www1-extension-729837/)

shipon_97 06-01-2009 07:46 AM

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 ?

linuxlover.chaitanya 06-01-2009 07:55 AM

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.

shipon_97 06-01-2009 08:12 AM

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 ?

chrism01 06-01-2009 06:46 PM

Did you restart Apache?

shipon_97 06-01-2009 11:03 PM

web page with 'www1' extension ?
 
Yes friend , I restart apache several times .. ..

mamtasahai1 06-02-2009 12:56 AM

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.