Advertisement
Guest User

Untitled

a guest
Mar 11th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.24 KB | None | 0 0
  1.  
  2. root@server:/etc/apache2/conf.d# cat /etc/apache2/sites-enabled/000-default
  3. <VirtualHost *:80>
  4. ServerAdmin webmaster@localhost
  5.  
  6. DocumentRoot /var/www
  7. <Directory />
  8. Options FollowSymLinks
  9. AllowOverride None
  10. </Directory>
  11. <Directory /var/www/>
  12. Options Indexes FollowSymLinks MultiViews
  13. AllowOverride None
  14. Order allow,deny
  15. allow from all
  16. </Directory>
  17.  
  18. ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  19. <Directory "/usr/lib/cgi-bin">
  20. AllowOverride None
  21. Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  22. Order allow,deny
  23. Allow from all
  24. </Directory>
  25.  
  26. ErrorLog ${APACHE_LOG_DIR}/error.log
  27.  
  28. # Possible values include: debug, info, notice, warn, error, crit,
  29. # alert, emerg.
  30. LogLevel warn
  31.  
  32. CustomLog ${APACHE_LOG_DIR}/access.log combined
  33.  
  34. Alias /doc/ "/usr/share/doc/"
  35. <Directory "/usr/share/doc/">
  36. Options Indexes MultiViews FollowSymLinks
  37. AllowOverride None
  38. Order deny,allow
  39. Deny from all
  40. Allow from 127.0.0.0/255.0.0.0 ::1/128
  41. </Directory>
  42.  
  43. </VirtualHost>
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. # This is the main Apache server configuration file. It contains the
  52. # configuration directives that give the server its instructions.
  53. # See http://httpd.apache.org/docs/2.2/ for detailed information about
  54. # the directives.
  55. #
  56. # Do NOT simply read the instructions in here without understanding
  57. # what they do. They're here only as hints or reminders. If you are unsure
  58. # consult the online docs. You have been warned.
  59. #
  60. # The configuration directives are grouped into three basic sections:
  61. # 1. Directives that control the operation of the Apache server process as a
  62. # whole (the 'global environment').
  63. # 2. Directives that define the parameters of the 'main' or 'default' server,
  64. # which responds to requests that aren't handled by a virtual host.
  65. # These directives also provide default values for the settings
  66. # of all virtual hosts.
  67. # 3. Settings for virtual hosts, which allow Web requests to be sent to
  68. # different IP addresses or hostnames and have them handled by the
  69. # same Apache server process.
  70. #
  71. # Configuration and logfile names: If the filenames you specify for many
  72. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  73. # server will use that explicit path. If the filenames do *not* begin
  74. # with "/", the value of ServerRoot is prepended -- so "foo.log"
  75. # with ServerRoot set to "/etc/apache2" will be interpreted by the
  76. # server as "/etc/apache2/foo.log".
  77. #
  78.  
  79. ### Section 1: Global Environment
  80. #
  81. # The directives in this section affect the overall operation of Apache,
  82. # such as the number of concurrent requests it can handle or where it
  83. # can find its configuration files.
  84. #
  85.  
  86. #
  87. # ServerRoot: The top of the directory tree under which the server's
  88. # configuration, error, and log files are kept.
  89. #
  90. # NOTE! If you intend to place this on an NFS (or otherwise network)
  91. # mounted filesystem then please read the LockFile documentation (available
  92. # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
  93. # you will save yourself a lot of trouble.
  94. #
  95. # Do NOT add a slash at the end of the directory path.
  96. #
  97. #ServerRoot "/etc/apache2"
  98.  
  99. #
  100. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  101. #
  102. LockFile ${APACHE_LOCK_DIR}/accept.lock
  103.  
  104. #
  105. # PidFile: The file in which the server should record its process
  106. # identification number when it starts.
  107. # This needs to be set in /etc/apache2/envvars
  108. #
  109. PidFile ${APACHE_PID_FILE}
  110.  
  111. #
  112. # Timeout: The number of seconds before receives and sends time out.
  113. #
  114. Timeout 300
  115.  
  116. #
  117. # KeepAlive: Whether or not to allow persistent connections (more than
  118. # one request per connection). Set to "Off" to deactivate.
  119. #
  120. KeepAlive On
  121.  
  122. #
  123. # MaxKeepAliveRequests: The maximum number of requests to allow
  124. # during a persistent connection. Set to 0 to allow an unlimited amount.
  125. # We recommend you leave this number high, for maximum performance.
  126. #
  127. MaxKeepAliveRequests 100
  128.  
  129. #
  130. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  131. # same client on the same connection.
  132. #
  133. KeepAliveTimeout 15
  134.  
  135. ##
  136. ## Server-Pool Size Regulation (MPM specific)
  137. ##
  138.  
  139. # prefork MPM
  140. # StartServers: number of server processes to start
  141. # MinSpareServers: minimum number of server processes which are kept spare
  142. # MaxSpareServers: maximum number of server processes which are kept spare
  143. # MaxClients: maximum number of server processes allowed to start
  144. # MaxRequestsPerChild: maximum number of requests a server process serves
  145. <IfModule mpm_prefork_module>
  146. StartServers 5
  147. MinSpareServers 5
  148. MaxSpareServers 10
  149. MaxClients 150
  150. MaxRequestsPerChild 0
  151. </IfModule>
  152.  
  153. # worker MPM
  154. # StartServers: initial number of server processes to start
  155. # MaxClients: maximum number of simultaneous client connections
  156. # MinSpareThreads: minimum number of worker threads which are kept spare
  157. # MaxSpareThreads: maximum number of worker threads which are kept spare
  158. # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
  159. # graceful restart. ThreadLimit can only be changed by stopping
  160. # and starting Apache.
  161. # ThreadsPerChild: constant number of worker threads in each server process
  162. # MaxRequestsPerChild: maximum number of requests a server process serves
  163. <IfModule mpm_worker_module>
  164. StartServers 2
  165. MinSpareThreads 25
  166. MaxSpareThreads 75
  167. ThreadLimit 64
  168. ThreadsPerChild 25
  169. MaxClients 150
  170. MaxRequestsPerChild 0
  171. </IfModule>
  172.  
  173. # event MPM
  174. # StartServers: initial number of server processes to start
  175. # MaxClients: maximum number of simultaneous client connections
  176. # MinSpareThreads: minimum number of worker threads which are kept spare
  177. # MaxSpareThreads: maximum number of worker threads which are kept spare
  178. # ThreadsPerChild: constant number of worker threads in each server process
  179. # MaxRequestsPerChild: maximum number of requests a server process serves
  180. <IfModule mpm_event_module>
  181. StartServers 2
  182. MaxClients 150
  183. MinSpareThreads 25
  184. MaxSpareThreads 75
  185. ThreadLimit 64
  186. ThreadsPerChild 25
  187. MaxRequestsPerChild 0
  188. </IfModule>
  189.  
  190. # These need to be set in /etc/apache2/envvars
  191. User ${APACHE_RUN_USER}
  192. Group ${APACHE_RUN_GROUP}
  193.  
  194. #
  195. # AccessFileName: The name of the file to look for in each directory
  196. # for additional configuration directives. See also the AllowOverride
  197. # directive.
  198. #
  199.  
  200. AccessFileName .htaccess
  201.  
  202. #
  203. # The following lines prevent .htaccess and .htpasswd files from being
  204. # viewed by Web clients.
  205. #
  206. <Files ~ "^\.ht">
  207. Order allow,deny
  208. Deny from all
  209. Satisfy all
  210. </Files>
  211.  
  212. #
  213. # DefaultType is the default MIME type the server will use for a document
  214. # if it cannot otherwise determine one, such as from filename extensions.
  215. # If your server contains mostly text or HTML documents, "text/plain" is
  216. # a good value. If most of your content is binary, such as applications
  217. # or images, you may want to use "application/octet-stream" instead to
  218. # keep browsers from trying to display binary files as though they are
  219. # text.
  220. #
  221. DefaultType text/plain
  222.  
  223.  
  224. #
  225. # HostnameLookups: Log the names of clients or just their IP addresses
  226. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  227. # The default is off because it'd be overall better for the net if people
  228. # had to knowingly turn this feature on, since enabling it means that
  229. # each client request will result in AT LEAST one lookup request to the
  230. # nameserver.
  231. #
  232. HostnameLookups Off
  233.  
  234. # ErrorLog: The location of the error log file.
  235. # If you do not specify an ErrorLog directive within a <VirtualHost>
  236. # container, error messages relating to that virtual host will be
  237. # logged here. If you *do* define an error logfile for a <VirtualHost>
  238. # container, that host's errors will be logged there and not here.
  239. #
  240. ErrorLog ${APACHE_LOG_DIR}/error.log
  241.  
  242. #
  243. # LogLevel: Control the number of messages logged to the error_log.
  244. # Possible values include: debug, info, notice, warn, error, crit,
  245. # alert, emerg.
  246. #
  247. LogLevel warn
  248.  
  249. # Include module configuration:
  250. Include mods-enabled/*.load
  251. Include mods-enabled/*.conf
  252.  
  253. # Include all the user configurations:
  254. Include httpd.conf
  255.  
  256. # Include ports listing
  257. Include ports.conf
  258.  
  259. #
  260. # The following directives define some format nicknames for use with
  261. # a CustomLog directive (see below).
  262. # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
  263. #
  264. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  265. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  266. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  267. LogFormat "%{Referer}i -> %U" referer
  268. LogFormat "%{User-agent}i" agent
  269.  
  270. # Include of directories ignores editors' and dpkg's backup files,
  271. # see README.Debian for details.
  272.  
  273. # Include generic snippets of statements
  274. Include conf.d/
  275.  
  276. # Include the virtual host configurations:
  277. Include sites-enabled/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement