Advertisement
Guest User

httpd.conf

a guest
Oct 24th, 2011
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.16 KB | None | 0 0
  1. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  2. # Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
  3. # configuration file. To have modifications retained, all modifications must be checked into the #
  4. # configuration system by running: #
  5. # /usr/local/cpanel/bin/apache_conf_distiller --update #
  6. # To see if your changes will be conserved, regenerate the Apache configuration file by running: #
  7. # /usr/local/cpanel/bin/build_apache_conf #
  8. # and check the configuration file for your alterations. If your changes have been ignored, then they will #
  9. # need to be added directly to their respective template files. #
  10. # #
  11. # It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
  12. # For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
  13. # system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
  14. # #
  15. # This configuration file was built from the following templates: #
  16. # /var/cpanel/templates/apache2/main.default #
  17. # /var/cpanel/templates/apache2/main.local #
  18. # /var/cpanel/templates/apache2/vhost.default #
  19. # /var/cpanel/templates/apache2/vhost.local #
  20. # /var/cpanel/templates/apache2/ssl_vhost.default #
  21. # /var/cpanel/templates/apache2/ssl_vhost.local #
  22. # #
  23. # Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
  24. # The only template updated by the apache_conf_distiller is main.default. #
  25. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  26.  
  27.  
  28. Include "/usr/local/apache/conf/includes/pre_main_global.conf"
  29. Include "/usr/local/apache/conf/includes/pre_main_2.conf"
  30.  
  31.  
  32.  
  33. LoadModule auth_passthrough_module modules/mod_auth_passthrough.so
  34. LoadModule bwlimited_module modules/mod_bwlimited.so
  35. LoadModule frontpage_module modules/mod_frontpage.so
  36.  
  37.  
  38.  
  39.  
  40. Include "/usr/local/apache/conf/php.conf"
  41. Include "/usr/local/apache/conf/modsec2.conf"
  42. Include "/usr/local/apache/conf/includes/errordocument.conf"
  43.  
  44.  
  45. ErrorLog "logs/error_log"
  46. DefaultType text/plain
  47. ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
  48. ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
  49. ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
  50. ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
  51. ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
  52. ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
  53. ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
  54. ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
  55.  
  56. RewriteEngine on
  57. AddType text/html .shtml
  58.  
  59. Alias /akopia /usr/local/cpanel/3rdparty/interchange/share/akopia/
  60. Alias /bandwidth /usr/local/bandmin/htdocs/
  61. Alias /img-sys /usr/local/cpanel/img-sys/
  62. Alias /interchange /usr/local/cpanel/3rdparty/interchange/share/interchange/
  63. Alias /interchange-5 /usr/local/cpanel/3rdparty/interchange/share/interchange-5/
  64. Alias /java-sys /usr/local/cpanel/java-sys/
  65. Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/
  66. Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/
  67. Alias /sys_cpanel /usr/local/cpanel/sys_cpanel/
  68.  
  69.  
  70. ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/
  71. ScriptAlias /mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/
  72.  
  73.  
  74. <Directory "/">
  75. Options All
  76. AllowOverride All
  77. </Directory>
  78.  
  79. <Directory "/usr/local/apache/htdocs">
  80. Options Includes Indexes FollowSymLinks
  81. AllowOverride None
  82. Order allow,deny
  83. Allow from all
  84.  
  85. </Directory>
  86.  
  87. <Files ~ "^error_log$">
  88. Order allow,deny
  89. Deny from all
  90.  
  91. Satisfy All
  92. </Files>
  93.  
  94. <FilesMatch "^\.ht">
  95. Order allow,deny
  96. Deny from all
  97.  
  98. Satisfy All
  99. </FilesMatch>
  100.  
  101. <IfModule log_config_module>
  102. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  103. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  104.  
  105. CustomLog logs/access_log common
  106.  
  107. <IfModule logio_module>
  108. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  109.  
  110. </IfModule>
  111.  
  112. </IfModule>
  113.  
  114. <IfModule alias_module>
  115. ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
  116.  
  117. </IfModule>
  118.  
  119. <Directory "/usr/local/apache/cgi-bin">
  120. AllowOverride None
  121. Options None
  122. Order allow,deny
  123. Allow from all
  124.  
  125. </Directory>
  126.  
  127. <IfModule mime_module>
  128. TypesConfig conf/mime.types
  129. AddType application/x-compress .Z
  130. AddType application/x-gzip .gz .tgz
  131.  
  132. </IfModule>
  133.  
  134. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  135. # Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
  136. # configuration file. To have modifications retained, all modifications must be checked into the #
  137. # configuration system by running: #
  138. # /usr/local/cpanel/bin/apache_conf_distiller --update #
  139. # To see if your changes will be conserved, regenerate the Apache configuration file by running: #
  140. # /usr/local/cpanel/bin/build_apache_conf #
  141. # and check the configuration file for your alterations. If your changes have been ignored, then they will #
  142. # need to be added directly to their respective template files. #
  143. # #
  144. # It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
  145. # For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
  146. # system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
  147. # #
  148. # This configuration file was built from the following templates: #
  149. # /var/cpanel/templates/apache2/main.default #
  150. # /var/cpanel/templates/apache2/main.local #
  151. # /var/cpanel/templates/apache2/vhost.default #
  152. # /var/cpanel/templates/apache2/vhost.local #
  153. # /var/cpanel/templates/apache2/ssl_vhost.default #
  154. # /var/cpanel/templates/apache2/ssl_vhost.local #
  155. # #
  156. # Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
  157. # The only template updated by the apache_conf_distiller is main.default. #
  158. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  159.  
  160.  
  161. PidFile logs/httpd.pid
  162. LockFile logs/accept.lock
  163. # Defined in /var/cpanel/cpanel.config: apache_port
  164. Listen 0.0.0.0:80
  165. User nobody
  166. Group nobody
  167. ExtendedStatus On
  168. ServerAdmin aahan.me@gmail.com
  169. ServerName wha.whatthenerd.com
  170. LogLevel warn
  171.  
  172. # These can be set in WHM under 'Apache Global Configuration'
  173. Timeout 300
  174.  
  175. ServerSignature On
  176.  
  177.  
  178.  
  179. <IfModule prefork.c>
  180.  
  181.  
  182. </IfModule>
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190. RewriteEngine on
  191. RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
  192. RewriteLock /usr/local/apache/logs/rewrite_lock
  193.  
  194. UserDir public_html
  195.  
  196. # DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
  197. DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html
  198.  
  199. # SSLCipherSuite can be set in WHM under 'Apache Global Configuration'
  200.  
  201. SSLPassPhraseDialog builtin
  202. SSLSessionCache dbm:/usr/local/apache/logs/ssl_scache
  203. SSLSessionCacheTimeout 300
  204. SSLMutex file:/usr/local/apache/logs/ssl_mutex
  205. SSLRandomSeed startup builtin
  206. SSLRandomSeed connect builtin
  207.  
  208. # Defined in /var/cpanel/cpanel.config: apache_ssl_port
  209. Listen 0.0.0.0:443
  210. AddType application/x-x509-ca-cert .crt
  211. AddType application/x-pkcs7-crl .crl
  212.  
  213.  
  214. AddHandler cgi-script .cgi .pl .plx .ppl .perl
  215. AddHandler server-parsed .shtml
  216. AddType text/html .shtml
  217. AddType application/x-tar .tgz
  218. AddType text/vnd.wap.wml .wml
  219. AddType image/vnd.wap.wbmp .wbmp
  220. AddType text/vnd.wap.wmlscript .wmls
  221. AddType application/vnd.wap.wmlc .wmlc
  222. AddType application/vnd.wap.wmlscriptc .wmlsc
  223.  
  224. <Location /whm-server-status>
  225. SetHandler server-status
  226. Order deny,allow
  227. Deny from all
  228. Allow from 127.0.0.1
  229. </Location>
  230.  
  231.  
  232.  
  233. # SUEXEC is supported
  234.  
  235. Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
  236. Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
  237.  
  238. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  239. NameVirtualHost 50.116.67.169:443
  240. NameVirtualHost 50.116.67.169:80
  241. NameVirtualHost 50.116.73.82:80
  242. NameVirtualHost *
  243.  
  244. # Default vhost for unbound IPs
  245.  
  246. <VirtualHost *>
  247. ServerName wha.whatthenerd.com
  248. DocumentRoot /usr/local/apache/htdocs
  249. ServerAdmin aahan.me@gmail.com
  250. <IfModule mod_suphp.c>
  251. suPHP_UserGroup nobody nobody
  252. </IfModule>
  253. </VirtualHost>
  254.  
  255. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  256.  
  257. <VirtualHost 50.116.67.169:80>
  258. ServerName whatthenerd.com
  259. ServerAlias www.whatthenerd.com
  260. DocumentRoot /home/aahan/public_html
  261. ServerAdmin webmaster@whatthenerd.com
  262. UseCanonicalName Off
  263. CustomLog /usr/local/apache/domlogs/whatthenerd.com combined
  264. CustomLog /usr/local/apache/domlogs/whatthenerd.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
  265. ## User aahan # Needed for Cpanel::ApacheConf
  266. <IfModule mod_suphp.c>
  267. suPHP_UserGroup aahan aahan
  268. </IfModule>
  269. <IfModule !mod_disable_suexec.c>
  270. SuexecUserGroup aahan aahan
  271. </IfModule>
  272. ScriptAlias /cgi-bin/ /home/aahan/public_html/cgi-bin/
  273.  
  274.  
  275. # To customize this VirtualHost use an include file at the following location
  276. # Include "/usr/local/apache/conf/userdata/std/2/aahan/whatthenerd.com/*.conf"
  277.  
  278. </VirtualHost>
  279.  
  280. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  281.  
  282. <VirtualHost 50.116.67.169:80>
  283. ServerName i.whatthenerd.com
  284. ServerAlias www.i.whatthenerd.com
  285. DocumentRoot /home/aahan/public_html/wp-content/uploads
  286. ServerAdmin webmaster@i.whatthenerd.com
  287. UseCanonicalName On
  288. CustomLog /usr/local/apache/domlogs/i.whatthenerd.com combined
  289. CustomLog /usr/local/apache/domlogs/i.whatthenerd.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
  290. ## User aahan # Needed for Cpanel::ApacheConf
  291. <IfModule mod_suphp.c>
  292. suPHP_UserGroup aahan aahan
  293. </IfModule>
  294. <IfModule !mod_disable_suexec.c>
  295. SuexecUserGroup aahan aahan
  296. </IfModule>
  297. ScriptAlias /cgi-bin/ /home/aahan/public_html/wp-content/uploads/cgi-bin/
  298.  
  299.  
  300. # To customize this VirtualHost use an include file at the following location
  301. # Include "/usr/local/apache/conf/userdata/std/2/aahan/i.whatthenerd.com/*.conf"
  302.  
  303. </VirtualHost>
  304.  
  305. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  306.  
  307. <VirtualHost 50.116.67.169:80>
  308. ServerName wwwerycom.whatthenerd.com
  309. ServerAlias www.wwwerycom.whatthenerd.com www.wwwery.com wwwery.com
  310. DocumentRoot /home/aahan/public_html/wwwerycom
  311. ServerAdmin webmaster@wwwerycom.whatthenerd.com
  312. UseCanonicalName Off
  313. CustomLog /usr/local/apache/domlogs/wwwerycom.whatthenerd.com combined
  314. CustomLog /usr/local/apache/domlogs/wwwerycom.whatthenerd.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
  315. ## User aahan # Needed for Cpanel::ApacheConf
  316. <IfModule mod_suphp.c>
  317. suPHP_UserGroup aahan aahan
  318. </IfModule>
  319. <IfModule !mod_disable_suexec.c>
  320. SuexecUserGroup aahan aahan
  321. </IfModule>
  322. ScriptAlias /cgi-bin/ /home/aahan/public_html/wwwerycom/cgi-bin/
  323.  
  324.  
  325. # To customize this VirtualHost use an include file at the following location
  326. # Include "/usr/local/apache/conf/userdata/std/2/aahan/wwwerycom.whatthenerd.com/*.conf"
  327.  
  328. </VirtualHost>
  329.  
  330. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  331.  
  332.  
  333. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  334.  
  335. # SSL
  336. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  337.  
  338. <VirtualHost 50.116.67.169:443>
  339. ServerName whatthenerd.com
  340. ServerAlias www.whatthenerd.com
  341. DocumentRoot /home/aahan/public_html
  342. ServerAdmin webmaster@whatthenerd.com
  343. UseCanonicalName Off
  344. CustomLog /usr/local/apache/domlogs/whatthenerd.com combined
  345. CustomLog /usr/local/apache/domlogs/whatthenerd.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
  346. ## User aahan # Needed for Cpanel::ApacheConf
  347. <IfModule mod_suphp.c>
  348. suPHP_UserGroup aahan aahan
  349. </IfModule>
  350. <IfModule !mod_disable_suexec.c>
  351. SuexecUserGroup aahan aahan
  352. </IfModule>
  353. ScriptAlias /cgi-bin/ /home/aahan/public_html/cgi-bin/
  354. SSLEngine on
  355.  
  356. SSLCertificateFile /etc/ssl/certs/whatthenerd.com.crt
  357. SSLCertificateKeyFile /etc/ssl/private/whatthenerd.com.key
  358. CustomLog /usr/local/apache/domlogs/whatthenerd.com-ssl_log combined
  359. SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
  360. <Directory "/home/aahan/public_html/cgi-bin">
  361. SSLOptions +StdEnvVars
  362. </Directory>
  363.  
  364. # To customize this VirtualHost use an include file at the following location
  365. # Include "/usr/local/apache/conf/userdata/ssl/2/aahan/whatthenerd.com/*.conf"
  366.  
  367. </VirtualHost>
  368.  
  369.  
  370. # CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS
  371. <VirtualHost 50.116.67.169:443 50.116.67.169:80 50.116.73.82:80 *>
  372. ServerName wha.whatthenerd.com
  373. ServerAlias cpanel.* whm.* webmail.* webdisk.*
  374. DocumentRoot /usr/local/apache/htdocs
  375. ServerAdmin aahan.me@gmail.com
  376. <IfModule mod_suphp.c>
  377. suPHP_UserGroup nobody nobody
  378. </IfModule>
  379. RewriteEngine On
  380. <IfModule core.c>
  381. SSLProxyEngine On
  382. </IfModule>
  383. RewriteCond %{HTTP_HOST} ^cpanel\.
  384. RewriteCond %{HTTPS} on
  385. RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]
  386. RewriteCond %{HTTP_HOST} ^webmail\.
  387. RewriteCond %{HTTPS} on
  388. RewriteRule ^/(.*) https://127.0.0.1:2096/$1 [P]
  389. RewriteCond %{HTTP_HOST} ^whm\.
  390. RewriteCond %{HTTPS} on
  391. RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]
  392. RewriteCond %{HTTP_HOST} ^webdisk\.
  393. RewriteCond %{HTTPS} on
  394. RewriteRule ^/(.*) https://127.0.0.1:2078/$1 [P]
  395. RewriteCond %{HTTP_HOST} ^cpanel\.
  396. RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
  397. RewriteCond %{HTTP_HOST} ^webmail\.
  398. RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
  399. RewriteCond %{HTTP_HOST} ^whm\.
  400. RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
  401. RewriteCond %{HTTP_HOST} ^webdisk\.
  402. RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
  403. UseCanonicalName Off
  404. </VirtualHost>
  405.  
  406.  
  407. Include "/usr/local/apache/conf/includes/post_virtualhost_global.conf"
  408. Include "/usr/local/apache/conf/includes/post_virtualhost_2.conf"
  409.  
  410.  
  411. # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
  412.  
  413.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement