RE: [PHP] Apache - Virtual Name

From: Date: Fri, 15 Feb 2002 14:00:38 +0000
Subject: RE: [PHP] Apache - Virtual Name
Groups: php.general 
Request: Send a blank email to php-general+get-84902@lists.php.net to get a copy of this message
edit /etc/httpd/conf/httpd.conf look for ServerName in Core directives. Change to something like: ServerName myserver Find VirtualHost section and locate a VirtualHost block. It should be commented out. Copy the lines between #<VirtualHost> #</VirtualHost> and paste them. Remove # comment designator. Change to: <VirtualHost 192.168.1.6> ServerName www.test.com DocumentRoot /var/www/testsite/html ServerAdmin a.f.miertschink@terra.com.br </VirtualHost> In the above, change 192.168.1.6 to the internal IP address of you Apache host Find the NameVirtualHost directive that preceds the VirtualHost directives. Change to: NameVirtualHost 192.168.1.6 create a directory: /var/www/testsite/html put an index.html file in it. go to /etc/init.d, type: ./httpd restart Ensure your DNS records ( A, CNAME ) for test.com point to the static IP address of your system. If you do not have direct control of your DNS records, use www.everydns.net to do so. Read the Apache PDF documentation at www.apache.org concerning Virtual Hosts Get more info from one of the Apache mailing lists I just went through this exercise, so the frustration and pain is still fresh -----Original Message----- From: André Felix Miertschink [mailto:a.f.miertschink@terra.com.br] Sent: Friday, February 15, 2002 6:05 AM To: php-general@lists.php.net Subject: [PHP] Apache - Virtual Name How can I configure the apache, so that my local access is different from http://localhost. I want to access my local server through a virtual name (Example: http://www.test.com). I only want to change the name "localhost" for any other name. I already possess a domain (Example: www.test.com) and I want to use this same name also in my local server in case I am not connected in the internet, only to simulate some cases of PHP. Thanks, André -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#84902) next »