invincible_virus Posted September 7, 2008 Share Posted September 7, 2008 Hi, I have apache2 http server installed on Fedora 8. I generally log in as non-root user, so I wanted to change document root in httpd.conf to "/home/saurabh/mysite". After changing the files, when I try to start http server, I get an error - Starting httpd: Syntax error on line 280 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a directory Also, I get a pop-up error saying SELinux AVC denial. Click here to view. But, when I click, nothing appears. Any Ideas?? Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/ Share on other sites More sharing options...
corbin Posted September 7, 2008 Share Posted September 7, 2008 Can you show us your DocumentRoot line? Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/#findComment-635914 Share on other sites More sharing options...
invincible_virus Posted September 7, 2008 Author Share Posted September 7, 2008 Here it is - DocumentRoot "/home/saurabh/pgspace" <Directory "/home/saurabh/pgspace"> Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/#findComment-635926 Share on other sites More sharing options...
corbin Posted September 7, 2008 Share Posted September 7, 2008 Hrmmm, I doubt this is it, but try: DocumentRoot "/home/saurabh/pgspace/" If you go into bash or the shell or something, can you cd to that dir? Just to make sure it's typed correctly and what not. Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/#findComment-635937 Share on other sites More sharing options...
invincible_virus Posted September 7, 2008 Author Share Posted September 7, 2008 thanks corbin. Already tried all these things without any success. I guess it has something to do with that AVC denial error. Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/#findComment-635952 Share on other sites More sharing options...
corbin Posted September 7, 2008 Share Posted September 7, 2008 What user does Apache run as? Might wanna make sure it has access to the directory. Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/#findComment-635988 Share on other sites More sharing options...
invincible_virus Posted September 9, 2008 Author Share Posted September 9, 2008 I log in as a normal user. Then I open a terminal & switch to root, and execute command to start apache server. Also, In the same terminal I am able to do a 'cd' to that directory. Which means, both the normal user & root have access to that directory. Quote Link to comment https://forums.phpfreaks.com/topic/123135-unable-to-change-documentroot/#findComment-637321 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.