Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Apache 2 site troubles with permissions and folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Apache 2 site troubles with permissions and folders
Authored by: KenDRhyD on Nov 07, '07 03:56:18AM
I have tried all of the changes you suggested, to no avail -- attempts to access my virtual host named "d2.test" simply result in the "Test Page for Apache Installation" being displayed.

I should note that my 'home' page displayed clean even after making the changes you proposed, but I cannot get at the test site directly (which messes up relative path references).

Interestingly enough, since my pages are PHP based, if I enter the URL as d2.test/index.php, I get a 'file not found' page; but if I enter d2.test/index.hrml then the Apache test page is displayed. This would seem to indicate that the virtual host is not being properly referenced, would it not?

Here is my entry from /private/etc/apache2/extra/httpd-vhosts.conf:


<VirtualHost *:80>
	ServerAdmin kendrhyd@sympatico.ca
	DocumentRoot /Users/krallen/Sites/D2TestSite
	ServerName d2.test
	ErrorLog /Users/krallen/Sites/D2TestSite.log
	<Directory /Users/krallen/Sites/D2TestSite>
		Options FollowSymLinks
		AllowOverride None
		Order deny,allow
		Allow from all
	</Directory>
</VirtualHost>


[ Reply to This | # ]
10.5: Apache 2 site troubles with permissions and folders
Authored by: lapeyre2 on Nov 07, '07 11:46:31AM
  1. didn't you forget to uncomment the line Include /private/etc/apache2/extra/httpd-vhosts.conf in httpd.conf ?
  2. did you add the line :
    127.0.0.1	d2.test
    in /private/etc/hosts ?


[ Reply to This | # ]
10.5: Apache 2 site troubles with permissions and folders
Authored by: KenDRhyD on Nov 12, '07 06:02:39AM
I have made the following changes:
  1. Edited /private/etc/hosts to add the line 127.0.0.1 d2.test
  2. Edited /private/etc/apache2/httpd.conf to enable the PHP2 and fast CGI load modules, to change the ServerAdmin to my email address, edited the Directory entry to read Allow from all, and uncommented the line Include /private/etc/apache2/extra/httpd-vhosts.conf. Note that I did not edit the #ServerName www.example.com:80 line, leaving it as original (commented out).
  3. I edited the /private/etc/apache2/extra/httpd-vhosts.conf file to add the entry for my d2.test site, as noted in the earlier posting
Often when I start web sharing and try to visit my default web site, but if I stop and start it again it usually works. So my default (~krallen) web site it loading.

When I enter d2.test as the URL, I get a page that indicates Safari can't open the page "http://d2.test/" because it could not connect to the server "d2.test".

I cannot see that I am missing anything or doing anything wrong, but it will not load the alternate site. Please provide any insights possible.

[ Reply to This | # ]

10.5: Apache 2 site troubles with permissions and folders
Authored by: KenDRhyD on Nov 12, '07 06:20:47AM
Some additional tests reveal that the problem is more odd than I suspected.

As a test, I modified the index.html file in my default site (~krallen) to include a link to the root of my alternate site:

<p><a href='./D2TestSite/index.php'>D2 Test Site link</a></p>
If I leave the Include /private/etc/apache2/extra/httpd-vhosts.conf line commented out, then the link works (except that my page is not host rooted properly, so the code in the page does not work as expected.

If I uncomment the Include /private/etc/apache2/extra/httpd-vhosts.conf line (and stop and restart web sharing), then I almost always get an error when I click on the preferences link to my default site: Safari can't open the page "http://172.16.1.200/~krallen/" because it could not connect to the server "172.16.1.200".. Every once in a while I get the default site to load with the line uncommented, but then that new link fails with a similar error, but the URL now has my alternate site directory appended.

Arrgghh!

[ Reply to This | # ]

10.5: Apache 2 site troubles with permissions and folders
Authored by: KenDRhyD on Nov 16, '07 03:32:48PM
Actually, the problem is more fundamental (but I still do not know how to correct it).

On a new Leopard install, if I enable web sharing, the logged-in user default web page URL works and displays the default page provided by Leopard.

If I edit the /private/etc/apache2/httpd.conf file to uncomment the line that includes the /private/etc/apache2/extra/httpd-vhosts.conf file and then stop and restart web sharing, I cannot access the logged-in user web site! It reports the error that it cannot access the specified server (which is the IP address of the current system).

If I edit the file to comment out that include line and stop and start web sharing once more, then I can again access the logged-in user web site! Why does including the default (provided) version of this file prevent the default web site from loading? Is there something I have to change to permit the logged-in web site to work when this fil eis included?

[ Reply to This | # ]