I have 2 Apache instances on the same server, one on port 80, one on another port. The first one works fine. When I go to mydomain.com:otherport I get the error message named in the title. The directory does exist, and has the same user and group that the web server is running as.
A:
You probably need to set up the http.conf for the second instance. Why are you doing it as two instances in the first place?
Two thoughts:
- Gradually change the non-working configuration till it matches the working one (make a backup first of course) and see what change fixes it
- Look at the error_log; if necessary, raise the logging level until you see something informative.
MarkusQ
2009-03-30 23:44:47
There is a separate httpd.conf:I am programming a control panel for use by web hosts, port 80 would be the host's main domain, the other one would be the control panel.
2009-03-30 23:50:31
Yes, but why do you need a separate apache instance for that?
MarkusQ
2009-03-31 02:54:47
It needs to have none of the restrictions on PHP that the main domain must have (to prevent people from hacking the server).
2009-03-31 18:15:53
Ah. Makes sense.
MarkusQ
2009-03-31 18:47:31
Here is the error: Attempt to serve directory: /path/to/document/rootA site I found suggested adding an index.html file. It didn't work, even after adding a DirectoryIndex directive.I can access the index file I created by going to http://domain.com:port/index.html, but not http://domain.com:port.
2009-03-31 20:15:00
A:
Finally figured it out. When I added the DirectoryIndex directive, I was adding it to the main httpd.conf virtual host which I had just created, while the second server was still running off the second instance. Now I feel stupid!
For anyone else that is reading, if you are getting this error and can't figure out why, you need to add a DirectoryIndex directive.