I am trying to change the default root directory in Apache webserver but having trouble accessing it from webbrowser.
Disabled SELinux
Stopped IPTables
Trying to make : "/var/www/test/" as default folder
In cd /etc/httpd/conf/httpd.conf : I am making following changes:
292 DocumentRoot "/var/www/test"
302 <Directory /var/www/test>
303 Options FollowSymLinks
304 AllowOverride None
305 Order allow,deny
306 Allow from all
307 </Directory>
317 # This should be changed to whatever you set DocumentRoot to.
318 #
319 <Directory "/var/www/test">
Created folder test under: /var/www/ and gave chmod -R 755 /var/www/test/
Restarted httpd and restarted with no errors.
Here are few instances of logs:
Access Logs:
192.168.1.18 - - [10/Jun/2015:18:27:00 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:18:27:04 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:18:27:40 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:18:27:47 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; LCJB; rv:11.0) like Gecko"
192.168.1.18 - - [10/Jun/2015:18:27:47 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; LCJB; rv:11.0) like Gecko"
192.168.1.18 - - [10/Jun/2015:18:31:06 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:18:31:09 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:18:31:27 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:18:45:29 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:19:00:10 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:19:00:12 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:19:00:13 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:19:06:33 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:19:06:37 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
192.168.1.18 - - [10/Jun/2015:19:26:22 -0500] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
~
Error Logs:
[Wed Jun 10 18:45:20 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 10 18:45:20 2015] [notice] Digest: done
[Wed Jun 10 18:45:20 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Wed Jun 10 18:45:25 2015] [notice] caught SIGTERM, shutting down
[Wed Jun 10 18:45:26 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jun 10 18:45:26 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 10 18:45:26 2015] [notice] Digest: done
[Wed Jun 10 18:45:26 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Wed Jun 10 18:59:07 2015] [notice] caught SIGTERM, shutting down
[Wed Jun 10 19:00:05 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jun 10 19:00:05 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 10 19:00:05 2015] [notice] Digest: done
[Wed Jun 10 19:00:05 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Wed Jun 10 19:00:08 2015] [notice] caught SIGTERM, shutting down
[Wed Jun 10 19:00:09 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jun 10 19:00:09 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 10 19:00:09 2015] [notice] Digest: done
[Wed Jun 10 19:00:09 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Wed Jun 10 19:24:44 2015] [notice] caught SIGTERM, shutting down
[Wed Jun 10 19:24:45 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jun 10 19:24:45 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 10 19:24:45 2015] [notice] Digest: done
[Wed Jun 10 19:24:45 2015] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations