I have a test server on a private network (IP 192.168.101.2). I have public addresses that get forwarded by the router to the server on the private network. For instance, www.ez-ms.com resolves to the public address 206.72.99.14. The router forwards this to 192.168.101.2.
All pretty straight forward.
I changed my template to use the public address for DNS. I left the VM shared address as "From network interface" which eth0 resolves to 192.168.101.2.
All is fine so far. DNS resolves correctly and the server is setup in it’s correct /home/ez-ms.com directory.
FTP via a browser to ‘ftp.ez-ms.com’ works fine. I get prompted for the user/password and it places me at the virtual root /home/ez-ms.com.
However, any access to the ‘http’ protocol does not resolve to the virtual root.
In httpd.conf:
[code:1]NameVirtualHost 192.168.101.2:80
NameVirtualHost 206.72.99.14:80
[/code:1]
and the Virtual Server was configured by VM to be:
You don’t have permission to access / on this server.
Apache/2.2.8 (Fedora) Server at www.ez-ms.com Port 80[/code:1]
I do not know what to do next… I’m sure it’s some funny related to the public/private interfaces. I’ve searched the archives and found some info, but nothing that offers a solution.
No .htaccess at all and no, it’s not world-readable. It is 750 per the template specification (inheritied from the default template). Only members of group apache should be able to access.
[code:1][root@linux1 /]# find / -type f -name .htaccess -print
/home/ez-ms.com/public_html/stats/.htaccess.
[root@linux1 /]# ls -ld /home/ez-ms.com/public_html
drwxr-x— 3 ez-ms.comez-ms.com 4096 2008-11-15 14:46 /home/ez-ms.com/public_html
[/code:1]
Interesting that the group is ‘4096’ instead of being listed as ‘apache’… Will investigate a bit further.
My error, the 4096 is the size. But according to the template it should be group ‘apache’ instead of group ‘ez-ms.com’… Or maybe apache needs to be configured to run as group ‘ez-ms.com’?
I didn’t change a thing that I can think of. I’ve created/deleted this site so many times that I loose track. Nothing appears different in httpd.conf and I don’t think I changed anything in the templates. I actually deleted/created this same server between the prior responses.
I don’t know this httpd stuff but it seems that if the “NameVirtualHost” is the system’s address and port (like 192.168.101.2:80) and with a ‘VirtualHost’ of ‘192.168.101.2:80’; it’s not clear at all to me what happens when the next virtual server is added. Won’t this be in conflict? I would think it would create a ‘NameVirtualHost’ as the actual domain name (like ‘ez-ms.com’) and then create a ‘VirtualHost’ by that name so that they remain separated.
It’s a mystery to me why it started working. But it makes me VERY nervous when I don’t understand what changed because my experience is that it will come back to bite me at a less appropriate time.
Will try to create another server and see what happens…
Guess I’ll approach with first things first… I mv’d index.html to index.php and changed the content to be
[code:1]"Test you are here: <?php echo getcwd();?>[/code:1]
Unfortunately it reads "Test you are here: "… So it appears that php is NOT available. I thought the template specified PHP5 as the version to use. So guess I’ll have to figure this one out next. Then I’ll try creating another server!
Also, it did not put any of the default web content in the directory. However, I didn’t provide any string in the textbox so maybe no content is applied if there’s no text in the “Initial website content” area?