Jump to content

Apache2: Changed DocumentRoot


ShineDesign
 Share

Recommended Posts

So I changed my DocumentRoot in my httpd2.conf and httpd2-perl.conf to point to /var/www/data, as that is the folder all my perl scripts are pointing to within my website. Though, now whenever I try to access my company website http://www.componentconcepts.com, it gives a 403 Forbidden error message. All permissions are the exact same for /data as they were for /html, which was the original DocumentRoot (and worked also, only the perl scripts didn't of course). What is going wrong here?

Link to comment
Share on other sites

first, does the user 'apache' have access to that folder?

 

IF so try adding this somewhere at the bottom of the config file:

 

<Directory /var/www/data/>

order allow,deny

allow from all

</Directory>

 

You shouldn't *really* need that, but just try it for now while i think of a proper fix

 

edit: sorry discount my first sentence, i skimread

Edited by fissy
Link to comment
Share on other sites

perl scripts need execute permissions? i don't know, only ever use php.

 

is there an index.html file in there you're trying to access?

 

The perl scrips are looking for and returning results to display on the page from /data, so that's why I need the root to be /var/www/data.

 

There is an index.html file, yes. There's alot of other files as well :) hehe.

Link to comment
Share on other sites

Not Found

The requested URL /index.html was not found on this server.
<<<apache advertising removed>>>

 

Apache doesn't think there is anything in there, which is possibly why you get the 403. It may see that there is no index.html, then try to auto index (display a directory listing), find its not allowed and so show the 403.

 

i don't really know though, i've just got back from the pub

 

edit: you might wish to get rid of all that advertising information about perl and openssl etc, its a mild security hazard

Edited by fissy
Link to comment
Share on other sites

Ok, got it all to work. The resolution was easy...I was running apache under my normal user, which for some reason didn't have permission (even though it says it does) to access that. So I ran apache after su'ing to root, and it works. Now all I gotta do is fix the dang internal server error when viewing the products page!

Link to comment
Share on other sites

Anybody know how this can be fixed?

 

Currently, if I go to 127.0.0.1 locally, it gives the same forbidden error. (through Konqueror, running from root)

 

Though if run "konqueror /var/www/data/index.html" the site comes up just fine. My permissions are set to allow read and execute access in user, group and other. All permissions are fine, the apache server was started from root, I can't think of anything else that could be causing this. Anybody?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...