13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 7 ■ WORKING WITH APACHEapache2 -k stop; apachectl startHere’s a default /etc/apache2/apache2.conf file to start off with:ServerRoot "/etc/apache2"LockFile /var/lock/apache2/accept.lockPidFile ${APACHE_PID_FILE}Timeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15User ${APACHE_RUN_USER}Group ${APACHE_RUN_GROUP}AccessFileName .htaccessOrder allow,denyDeny from allDefaultType text/plainHostnameLookups OffErrorLog /var/log/apache2/error.logLogLevel warnInclude /etc/apache2/mods-enabled/*.loadInclude /etc/apache2/mods-enabled/*.confInclude /etc/apache2/ports.confInclude /etc/apache2/conf.d/Include /etc/apache2/sites-enabled/ServerAdmin webmaster@localhostDocumentRoot /var/www/Options FollowSymLinksAllowOverride NoneThe first thing to do is to test this config file:apache2 -tThis will check that the config files are syntactically correct. It’s a very useful one to use before youtry restarting your production server!158Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!