asidu
asked on
How to modify the httpd.conf in FC5 using an editor
I am running Apache on Fedora Core 5.
It was working fine.
Now, I have installed a new hard disk with data on to the machine.
I would like to point my document root to the new hard disk.
So I tried to edit the /etc/httpd/conf/ httpd.conf . Changed the line
Document root to a new location from /var/www/html to /data3/webdat
However, when I restart the httpd service I get a FAILED error.
I realised that I cannot make any changes to http.conf file.
How could I go about successfully editing the httpd.conf file?
Thanks.
It was working fine.
Now, I have installed a new hard disk with data on to the machine.
I would like to point my document root to the new hard disk.
So I tried to edit the /etc/httpd/conf/ httpd.conf . Changed the line
Document root to a new location from /var/www/html to /data3/webdat
However, when I restart the httpd service I get a FAILED error.
I realised that I cannot make any changes to http.conf file.
How could I go about successfully editing the httpd.conf file?
Thanks.
ASKER
I modified the /etc/httpd/conf/httpd.conf file
and run the command apachectl -t
I only changed one line to point the Document root to another location...and the result is shown below :-
[root@deskpro etc]# apachectl configtest
Syntax OK
[root@deskpro etc]# service httpd start
Starting httpd: [FAILED]
Do I have to worry or take care of any security settings ?
Thank u.
and run the command apachectl -t
I only changed one line to point the Document root to another location...and the result is shown below :-
[root@deskpro etc]# apachectl configtest
Syntax OK
[root@deskpro etc]# service httpd start
Starting httpd: [FAILED]
Do I have to worry or take care of any security settings ?
Thank u.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys for the pointers.
Really the problem was with the SeLinux.
What I did is
[root@deskpro run]# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 20
Policy from config file: targeted
change the Current mode from enforcing to permissive by
[root@deskpro run]# setenforce 0
[root@deskpro run]# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 20
Policy from config file: targeted
After doing that I can restart apache server without problems.
Now able to modify the httpd.conf file without an issue.
Would there be an issue to make the Current mode permissive ?
asidu
Really the problem was with the SeLinux.
What I did is
[root@deskpro run]# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 20
Policy from config file: targeted
change the Current mode from enforcing to permissive by
[root@deskpro run]# setenforce 0
[root@deskpro run]# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 20
Policy from config file: targeted
After doing that I can restart apache server without problems.
Now able to modify the httpd.conf file without an issue.
Would there be an issue to make the Current mode permissive ?
asidu
ASKER
Would like to close the question and award points to all those who responded.
apachectl -t
to figure out the problem with config file.
You may change httpd.conf file and restart apache as many times as you want.