>Number: 2789 >Category: config >Synopsis: Problems with virtual hosts migrating from apache_1.2.5 to >apache_1.3.1. >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Class: support >Submitter-Id: apache >Arrival-Date: Wed Aug 5 11:30:01 PDT 1998 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.1 >Environment: SunOS phtn 5.5.1 Generic_103640-19 sun4m sparc SUNW,SPARCstation-5 >Description: I need help with Virtual Hosting under apache_1.3.1. Here is some background. My server is behind a Cisco Pix firewall and responds to the IP address 206.52.116.9 which is www.phodyn.com. The DocumentRoot for this address is /opt/apache/htdocs. We have two CNAME aliases (www.photondynamics.com and www.phtn.com) which I want to point to our corporate web page (for the viewing public) under /opt/apache/htdocs/phtn. In addition, since this thing runs on our internal network, it's real name is phtn (with a www alias) and the domain is photon.com. Internal users can access the server by going to http://www.photon.com. I have been trying to get the NameVirtualHost directives to work but without much luck.
Here is how I have things setup in the httpd.conf file: NameVirtualHost 206.52.116.9 <VirtualHost 206.52.116.9> ServerAdmin [EMAIL PROTECTED] DocumentRoot /opt/apache/htdocs ServerName www.phodyn.com ErrorLog logs/www.phodyn.com-error_log TransferLog logs/www.phodyn.com-access_log </VirtualHost> NameVirtualHost 206.52.116.9 <VirtualHost 206.52.116.9> ServerAdmin [EMAIL PROTECTED] DocumentRoot /opt/apache/htdocs/phtn ServerName www.photondynamics.com ErrorLog logs/www.photondynamics.com-error_log TransferLog logs/www.photondynamics.com-access_log </VirtualHost> NameVirtualHost 206.52.116.9 <VirtualHost 206.52.116.9> ServerAdmin [EMAIL PROTECTED] DocumentRoot /opt/apache/htdocs/phtn ServerName www.phtn.com ErrorLog logs/www.phtn.com-error_log TransferLog logs/www.phtn.com-access_log </VirtualHost> I get the error message: [Wed Aug 5 11:16:18 1998] [warn] NameVirtualHost 206.52.116.9:80 has no VirtualHosts [Wed Aug 5 11:16:18 1998] [warn] NameVirtualHost 206.52.116.9:80 has no VirtualHosts [Wed Aug 5 11:16:18 1998] [notice] Apache/1.3.1 (Unix) configured -- resuming normal operations And as can be expected when I try to go to www.phtn.com or www.photondynamics.com I get the main servers document root. Under apache_1.2.5 I setup the httpd.conf file like so: <VirtualHost 206.52.116.9> ServerAdmin [EMAIL PROTECTED] DocumentRoot /opt/apache_1.2.5/htdocs ServerName www.phodyn.com ErrorLog logs/www.phodyn.com-error_log TransferLog logs/www.phodyn.com-access_log </VirtualHost> <VirtualHost 206.52.116.9> ServerAdmin [EMAIL PROTECTED] DocumentRoot /opt/apache_1.2.5/htdocs/phtn ServerName www.photondynamics.com ErrorLog logs/www.phodyn.com-error_log TransferLog logs/www.phodyn.com-access_log </VirtualHost> <VirtualHost 206.52.116.9> ServerAdmin [EMAIL PROTECTED] DocumentRoot /opt/apache_1.2.5/htdocs/phtn ServerName www.phtn.com ErrorLog logs/www.phodyn.com-error_log TransferLog logs/www.phodyn.com-access_log </VirtualHost> And everything works just fine. I've tried several different configurations under apache_1.3.1 and tried using ServerAlias directives and mixed IP-based and Name-based virtual hosts but can't seem to get the same results I had under apache_1.2.5. I've read the FAQ, looked at the examples and can't seem to get it right. Any help would be greatly appreciated. I absolutely love the apache server by the way! >How-To-Repeat: I can setup my server for you (I've gone back to apache_1.2.5 for now). If you visit http://www.phodyn.com you'll see the /opt/apache/htdocs/index.html and if you go to either www.photondynamics.com or www.phtn.com you'll see the public web page (/opt/apache/htdocs/phtn/index.html). I'd be happy to supply an additional information as required. I guess I'm stumped because I had this working rather easily under apache_1.2.5 and I understand the the NameVirtualHost directive was supposed to make things easier but for me it's been more difficult. >Fix: I'm sure this isn't truly a bug. It's more of a setup issue. I don't have access to the newsgroups (post capabilities) at this time which is why I'm submitting this here. Thanks for your attention. >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]
