Advertisement
Guest User

Untitled

a guest
Sep 7th, 2014
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.24 KB | None | 0 0
  1. <b>/etc/httpd/conf/httpd.conf =====================================================</b>
  2. ServerName localhost
  3. Listen 1.2.3.4:80
  4.  
  5. ServerTokens OS
  6. ServerRoot "/etc/httpd"
  7. PidFile run/httpd.pid
  8. Timeout 30
  9. KeepAlive Off
  10. MaxKeepAliveRequests 100
  11. KeepAliveTimeout 10
  12.  
  13. <IfModule prefork.c>
  14. StartServers 8
  15. MinSpareServers 5
  16. MaxSpareServers 20
  17. ServerLimit 256
  18. MaxClients 200
  19. MaxRequestsPerChild 4000
  20. </IfModule>
  21.  
  22. <IfModule worker.c>
  23. StartServers 2
  24. MaxClients 200
  25. MinSpareThreads 25
  26. MaxSpareThreads 75
  27. ThreadsPerChild 25
  28. MaxRequestsPerChild 4000
  29. </IfModule>
  30.  
  31. <IfModule itk.c>
  32. StartServers 8
  33. MinSpareServers 5
  34. MaxSpareServers 20
  35. ServerLimit 256
  36. MaxClients 256
  37. MaxRequestsPerChild 4000
  38. </IfModule>
  39.  
  40. LoadModule auth_basic_module modules/mod_auth_basic.so
  41. LoadModule auth_digest_module modules/mod_auth_digest.so
  42. LoadModule authn_file_module modules/mod_authn_file.so
  43. LoadModule authn_alias_module modules/mod_authn_alias.so
  44. LoadModule authn_anon_module modules/mod_authn_anon.so
  45. #LoadModule authn_dbm_module modules/mod_authn_dbm.so
  46. LoadModule authn_default_module modules/mod_authn_default.so
  47. LoadModule authz_host_module modules/mod_authz_host.so
  48. LoadModule authz_user_module modules/mod_authz_user.so
  49. LoadModule authz_owner_module modules/mod_authz_owner.so
  50. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  51. #LoadModule authz_dbm_module modules/mod_authz_dbm.so
  52. LoadModule authz_default_module modules/mod_authz_default.so
  53. #LoadModule ldap_module modules/mod_ldap.so
  54. #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  55. LoadModule include_module modules/mod_include.so
  56. LoadModule log_config_module modules/mod_log_config.so
  57. LoadModule logio_module modules/mod_logio.so
  58. LoadModule env_module modules/mod_env.so
  59. LoadModule ext_filter_module modules/mod_ext_filter.so
  60. LoadModule mime_magic_module modules/mod_mime_magic.so
  61. LoadModule expires_module modules/mod_expires.so
  62. LoadModule deflate_module modules/mod_deflate.so
  63. LoadModule headers_module modules/mod_headers.so
  64. LoadModule usertrack_module modules/mod_usertrack.so
  65. LoadModule setenvif_module modules/mod_setenvif.so
  66. LoadModule mime_module modules/mod_mime.so
  67. LoadModule dav_module modules/mod_dav.so
  68. LoadModule status_module modules/mod_status.so
  69. LoadModule autoindex_module modules/mod_autoindex.so
  70. #LoadModule info_module modules/mod_info.so
  71. #LoadModule dav_fs_module modules/mod_dav_fs.so
  72. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  73. LoadModule negotiation_module modules/mod_negotiation.so
  74. LoadModule dir_module modules/mod_dir.so
  75. LoadModule actions_module modules/mod_actions.so
  76. #LoadModule speling_module modules/mod_speling.so
  77. #LoadModule userdir_module modules/mod_userdir.so
  78. LoadModule alias_module modules/mod_alias.so
  79. LoadModule rewrite_module modules/mod_rewrite.so
  80. LoadModule proxy_module modules/mod_proxy.so
  81. #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  82. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  83. #LoadModule proxy_http_module modules/mod_proxy_http.so
  84. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  85. LoadModule cache_module modules/mod_cache.so
  86. LoadModule suexec_module modules/mod_suexec.so
  87. #LoadModule disk_cache_module modules/mod_disk_cache.so
  88. #LoadModule file_cache_module modules/mod_file_cache.so
  89. #LoadModule mem_cache_module modules/mod_mem_cache.so
  90. LoadModule cgi_module modules/mod_cgi.so
  91. LoadModule version_module modules/mod_version.so
  92.  
  93. <b>Include conf.d/*.conf ==================================================</b>
  94.  
  95. ExtendedStatus On
  96.  
  97. User apache
  98. Group apache
  99.  
  100. ServerAdmin root@localhost
  101. UseCanonicalName Off
  102. DocumentRoot "/var/www/html"
  103. <Directory />
  104. Options SymLinksIfOwnerMatch
  105. AllowOverride None
  106. </Directory>
  107.  
  108. <Directory "/var/www/html">
  109. Options Indexes SymLinksIfOwnerMatch
  110. AllowOverride None
  111. Order allow,deny
  112. Allow from all
  113. </Directory>
  114.  
  115. <IfModule mod_userdir.c>
  116. UserDir public_html
  117. </IfModule>
  118.  
  119. DirectoryIndex index.php index.htm index.html
  120.  
  121. AccessFileName .htaccess
  122. <Files ~ "^\.ht">
  123. Order allow,deny
  124. Deny from all
  125. </Files>
  126. TypesConfig /etc/mime.types
  127.  
  128. DefaultType text/plain
  129.  
  130. <IfModule mod_mime_magic.c>
  131. MIMEMagicFile conf/magic
  132. </IfModule>
  133.  
  134. HostnameLookups Off
  135.  
  136. ErrorLog logs/error_log
  137. LogLevel warn
  138.  
  139. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  140. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  141. LogFormat "%{Referer}i -> %U" referer
  142. LogFormat "%{User-agent}i" agent
  143. LogFormat "%b" bytes
  144. CustomLog logs/access_log combined
  145.  
  146. ServerSignature On
  147.  
  148. Alias /icons/ "/var/www/icons/"
  149.  
  150. <Directory "/var/www/icons">
  151. Options Indexes MultiViews
  152. AllowOverride None
  153. Order allow,deny
  154. Allow from all
  155. </Directory>
  156.  
  157. <Directory "/var/www/html">
  158. AllowOverride None
  159. Order allow,deny
  160. Allow from all
  161. </Directory>
  162.  
  163. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  164.  
  165. <Directory "/var/www/cgi-bin">
  166. AllowOverride None
  167. Options ExecCGI
  168. Order allow,deny
  169. Allow from all
  170. </Directory>
  171.  
  172. IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
  173.  
  174. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  175. AddIconByType (TXT,/icons/text.gif) text/*
  176. AddIconByType (IMG,/icons/image2.gif) image/*
  177. AddIconByType (SND,/icons/sound2.gif) audio/*
  178. AddIconByType (VID,/icons/movie.gif) video/*
  179. AddIcon /icons/binary.gif .bin .exe
  180. AddIcon /icons/binhex.gif .hqx
  181. AddIcon /icons/tar.gif .tar
  182. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  183. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  184. AddIcon /icons/a.gif .ps .ai .eps
  185. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  186. AddIcon /icons/text.gif .txt
  187. AddIcon /icons/c.gif .c
  188. AddIcon /icons/p.gif .pl .py
  189. AddIcon /icons/f.gif .for
  190. AddIcon /icons/dvi.gif .dvi
  191. AddIcon /icons/uuencoded.gif .uu
  192. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  193. AddIcon /icons/tex.gif .tex
  194. AddIcon /icons/bomb.gif core
  195. AddIcon /icons/back.gif ..
  196. AddIcon /icons/hand.right.gif README
  197. AddIcon /icons/folder.gif ^^DIRECTORY^^
  198. AddIcon /icons/blank.gif ^^BLANKICON^^
  199. DefaultIcon /icons/unknown.gif
  200. ReadmeName README.html
  201. HeaderName HEADER.html
  202. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  203. AddLanguage ca .ca
  204. AddLanguage cs .cz .cs
  205. AddLanguage da .dk
  206. AddLanguage de .de
  207. AddLanguage el .el
  208. AddLanguage en .en
  209. AddLanguage eo .eo
  210. AddLanguage es .es
  211. AddLanguage et .et
  212. AddLanguage fr .fr
  213. AddLanguage he .he
  214. AddLanguage hr .hr
  215. AddLanguage it .it
  216. AddLanguage ja .ja
  217. AddLanguage ko .ko
  218. AddLanguage ltz .ltz
  219. AddLanguage nl .nl
  220. AddLanguage nn .nn
  221. AddLanguage no .no
  222. AddLanguage pl .po
  223. AddLanguage pt .pt
  224. AddLanguage pt-BR .pt-br
  225. AddLanguage ru .ru
  226. AddLanguage sv .sv
  227. AddLanguage zh-CN .zh-cn
  228. AddLanguage zh-TW .zh-tw
  229. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
  230. ForceLanguagePriority Prefer Fallback
  231.  
  232. AddDefaultCharset UTF-8
  233.  
  234. AddType application/x-compress .Z
  235. AddType application/x-gzip .gz .tgz
  236. AddType image/x-icon .ico
  237.  
  238. AddType text/html .shtml
  239. AddOutputFilter INCLUDES .shtml
  240.  
  241. ErrorDocument 403 /error/403.html
  242. ErrorDocument 404 /error/404.html
  243. ErrorDocument 500 /error/50x.html
  244. ErrorDocument 501 /error/50x.html
  245. ErrorDocument 502 /error/50x.html
  246. ErrorDocument 503 /error/50x.html
  247. ErrorDocument 506 /error/50x.html
  248.  
  249. BrowserMatch "Mozilla/2" nokeepalive
  250. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  251. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  252. BrowserMatch "Java/1\.0" force-response-1.0
  253. BrowserMatch "JDK/1\.0" force-response-1.0
  254. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  255. BrowserMatch "MS FrontPage" redirect-carefully
  256. BrowserMatch "^WebDrive" redirect-carefully
  257. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  258. BrowserMatch "^gnome-vfs/1.0" redirect-carefully
  259. BrowserMatch "^XML Spy" redirect-carefully
  260. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  261.  
  262.  
  263. <code>1.2.3.4.conf ===========================================================</code>
  264. NameVirtualHost 1.2.3.4:8080
  265. Listen 1.2.3.4:8080
  266. NameVirtualHost 1.2.3.4:8443
  267. Listen 1.2.3.4:8443
  268.  
  269.  
  270. <code>vesta.conf ===============================================================</code>
  271. Include /home/admin/conf/web/httpd.conf
  272. Include /home/zzmaster/conf/web/httpd.conf
  273. и внутри:
  274. <VirtualHost 1.2.3.4:8080>
  275.  
  276. ServerName default.domain
  277. ServerAlias www.default.domain
  278. ServerAdmin info@default.domain
  279. DocumentRoot /home/admin/web/default.domain/public_html
  280. ScriptAlias /cgi-bin/ /home/admin/web/default.domain/cgi-bin/
  281. Alias /vstats/ /home/admin/web/default.domain/stats/
  282. Alias /error/ /home/admin/web/default.domain/document_errors/
  283. #SuexecUserGroup admin admin
  284. CustomLog /var/log/httpd/domains/default.domain.bytes bytes
  285. CustomLog /var/log/httpd/domains/default.domain.log combined
  286. ErrorLog /var/log/httpd/domains/default.domain.error.log
  287. <Directory /home/admin/web/default.domain/public_html>
  288. AllowOverride All
  289. Options +Includes -Indexes +ExecCGI
  290. </Directory>
  291. <Directory /home/admin/web/default.domain/stats>
  292. AllowOverride All
  293. </Directory>
  294.  
  295. <IfModule mod_ruid2.c>
  296. RMode config
  297. RUidGid admin admin
  298. RGroups apache
  299. </IfModule>
  300. <IfModule itk.c>
  301. AssignUserID admin admin
  302. </IfModule>
  303.  
  304. Include /home/admin/conf/web/httpd.default.domain.conf*
  305.  
  306. </VirtualHost>
  307.  
  308. <VirtualHost 1.2.3.4:8080>
  309.  
  310. ServerName domain.com
  311. ServerAlias
  312. ServerAdmin info@domain.com
  313. DocumentRoot /home/zzmaster/web/domain.com/public_html
  314. ScriptAlias /cgi-bin/ /home/zzmaster/web/domain.com/cgi-bin/
  315. Alias /vstats/ /home/zzmaster/web/domain.com/stats/
  316. Alias /error/ /home/zzmaster/web/domain.com/document_errors/
  317. #SuexecUserGroup zzmaster zzmaster
  318. CustomLog /var/log/httpd/domains/domain.com.bytes bytes
  319. CustomLog /var/log/httpd/domains/domain.com.log combined
  320. ErrorLog /var/log/httpd/domains/domain.com.error.log
  321. <Directory /home/zzmaster/web/domain.com/public_html>
  322. AllowOverride All
  323. Options +Includes -Indexes +ExecCGI
  324. </Directory>
  325. <Directory /home/zzmaster/web/domain.com/stats>
  326. AllowOverride All
  327. </Directory>
  328.  
  329. <IfModule mod_ruid2.c>
  330. RMode config
  331. RUidGid zzmaster zzmaster
  332. RGroups apache
  333. </IfModule>
  334. <IfModule itk.c>
  335. AssignUserID zzmaster zzmaster
  336. </IfModule>
  337.  
  338. Include /home/zzmaster/conf/web/httpd.domain.com.conf* <================= ТУТ ПУСТО
  339.  
  340. </VirtualHost>
  341.  
  342. <VirtualHost 1.2.3.4:8080>
  343.  
  344. ServerName x.domain.com
  345. ServerAlias www.x.domain.com
  346. ServerAdmin info@x.domain.com
  347. DocumentRoot /home/zzmaster/web/x.domain.com/public_html
  348. ScriptAlias /cgi-bin/ /home/zzmaster/web/x.domain.com/cgi-bin/
  349. Alias /vstats/ /home/zzmaster/web/x.domain.com/stats/
  350. Alias /error/ /home/zzmaster/web/x.domain.com/document_errors/
  351. #SuexecUserGroup zzmaster zzmaster
  352. CustomLog /var/log/httpd/domains/x.domain.com.bytes bytes
  353. CustomLog /var/log/httpd/domains/x.domain.com.log combined
  354. ErrorLog /var/log/httpd/domains/x.domain.com.error.log
  355. <Directory /home/zzmaster/web/x.domain.com/public_html>
  356. AllowOverride All
  357. Options +Includes -Indexes +ExecCGI
  358. </Directory>
  359. <Directory /home/zzmaster/web/x.domain.com/stats>
  360. AllowOverride All
  361. </Directory>
  362.  
  363. <IfModule mod_ruid2.c>
  364. RMode config
  365. RUidGid zzmaster zzmaster
  366. RGroups apache
  367. </IfModule>
  368. <IfModule itk.c>
  369. AssignUserID zzmaster zzmaster
  370. </IfModule>
  371.  
  372. Include /home/zzmaster/conf/web/httpd.x.domain.com.conf* <=============== ТУТ ПУСТО
  373.  
  374. </VirtualHost>
  375.  
  376. <code>fcgid.conf =============================================</code>
  377. # This is the Apache server configuration file for providing FastCGI support
  378. # through mod_fcgid
  379. #
  380. # Documentation is available at
  381. # http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
  382.  
  383. LoadModule fcgid_module modules/mod_fcgid.so
  384.  
  385. # Use FastCGI to process .fcg .fcgi & .fpl scripts
  386. AddHandler fcgid-script fcg fcgi fpl
  387.  
  388. # Sane place to put sockets and shared memory file
  389. FcgidIPCDir /var/run/mod_fcgid
  390. FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
  391.  
  392. <b>php.conf ===========================================</b>
  393. #
  394. # PHP is an HTML-embedded scripting language which attempts to make it
  395. # easy for developers to write dynamically generated webpages.
  396. #
  397. <IfModule prefork.c>
  398. LoadModule php5_module modules/libphp5.so
  399. </IfModule>
  400. <IfModule !prefork.c>
  401. LoadModule php5_module modules/libphp5-zts.so
  402. </IfModule>
  403.  
  404.  
  405. #
  406. # Cause the PHP interpreter to handle files with a .php extension.
  407. #
  408. <FilesMatch \.php$>
  409. SetHandler application/x-httpd-php
  410. </FilesMatch>
  411.  
  412. #
  413. # Allow php to handle Multiviews
  414. #
  415. AddType text/html .php
  416.  
  417. #
  418. # Add index.php to the list of files that will be served as directory
  419. # indexes.
  420. #
  421. DirectoryIndex index.php
  422.  
  423. #
  424. # Uncomment the following lines to allow PHP to pretty-print .phps
  425. # files as PHP source code:
  426. #
  427. #<FilesMatch \.phps$>
  428. # SetHandler application/x-httpd-php-source
  429. #</FilesMatch>
  430.  
  431. #
  432. # Apache specific PHP configuration options
  433. # those can be override in each configured vhost
  434. #
  435. php_value session.save_handler "files"
  436. php_value session.save_path "/var/lib/php/session"
  437.  
  438.  
  439. <b>phpMyAdmin.conf ===================================================</b>
  440. # phpMyAdmin - Web based MySQL browser written in php
  441. #
  442. # Allows only localhost by default
  443. #
  444. # But allowing phpMyAdmin to anyone other than localhost should be considered
  445. # dangerous unless properly secured by SSL
  446.  
  447. Alias /phpMyAdmin /usr/share/phpMyAdmin
  448. Alias /phpmyadmin /usr/share/phpMyAdmin
  449.  
  450. <Directory /usr/share/phpMyAdmin/>
  451. Order Deny,Allow
  452. Deny from All
  453. Allow from All
  454. </Directory>
  455.  
  456. <Directory /usr/share/phpMyAdmin/scripts/>
  457. Order Deny,Allow
  458. Deny from All
  459. Allow from All
  460. </Directory>
  461.  
  462. # This directory does not require access over HTTP - taken from the original
  463. # phpMyAdmin upstream tarball
  464. #
  465. <Directory /usr/share/phpMyAdmin/libraries/>
  466. Order Deny,Allow
  467. Deny from All
  468. Allow from None
  469. </Directory>
  470.  
  471. # This configuration prevents mod_security at phpMyAdmin directories from
  472. # filtering SQL etc. This may break your mod_security implementation.
  473. #
  474. #<IfModule mod_security.c>
  475. # <Directory /usr/share/phpMyAdmin/>
  476. # SecRuleInheritance Off
  477. # </Directory>
  478. #</IfModule>
  479.  
  480. <b>ruid2.conf ===========================================</b>
  481. # EXAMPLE:
  482. #
  483. # LoadModule ruid2_module modules/mod_ruid2.so
  484. # User apache
  485. # Group apache
  486. # RMode stat
  487. # RGroups apachetmp
  488. # RDocumentChRoot /home /example.com/public_html
  489. #
  490. # NameVirtualHost 192.168.0.1
  491. # <VirtualHost example.com>
  492. # ServerAdmin webmaster@example.com
  493. # RDocumentChRoot /home /example.com/public_html
  494. # ServerName example.com
  495. # ServerAlias www.example.com
  496. # RMode config
  497. # RUidGid user1 group1
  498. # RGroups apachetmp
  499. #
  500. # <Directory /home/example.com/public_html/dir>
  501. # RMode stat
  502. # </Directory>
  503. #
  504. # <Directory /home/example.com/public_html/dir/test>
  505. # RMode config
  506. # RUidGid user2 group2
  507. # RGroups groups1
  508. # </Directory>
  509. #
  510. # <Directory /home/example.com/public_html/dir/test/123>
  511. # RUidGid user3 group3
  512. # </Directory>
  513. #
  514. # <Location /yustadir>
  515. # RMode config
  516. # RUidGid user4 user4
  517. # RGroups groups4
  518. # </Location>
  519. #
  520. # </VirtualHost>
  521. #
  522. # <VirtualHost example.net>
  523. # ServerAdmin webmaster@example.net
  524. # DocumentRoot /home/example.net/public_html
  525. # ServerName example.net
  526. # ServerAlias www.example.net
  527. # </VirtualHost>
  528.  
  529. LoadModule ruid2_module modules/mod_ruid2.so
  530.  
  531. <IfModule mod_ruid2.c>
  532. RMode config
  533. RDefaultUidGid apache apache
  534. RUidGid apache apache
  535. RGroups apache
  536. </IfModule>
  537.  
  538. <b>ssl.conf ===========================================</b>
  539. LoadModule ssl_module modules/mod_ssl.so
  540.  
  541. AddType application/x-x509-ca-cert .crt
  542. AddType application/x-pkcs7-crl .crl
  543.  
  544. SSLPassPhraseDialog builtin
  545. SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
  546. SSLSessionCacheTimeout 300
  547. SSLMutex default
  548. SSLRandomSeed startup file:/dev/urandom 256
  549. SSLRandomSeed connect builtin
  550. SSLCryptoDevice builtin
  551.  
  552.  
  553.  
  554. <b> еще один нюанс - при рестарте апач выдает</b>
  555.  
  556. <code>Stopping httpd: [ OK ]
  557. Starting httpd: [Sun Sep 07 05:42:21 2014] [warn] NameVirtualHost 1.2.3.4:8443 has no VirtualHosts
  558. </code>
  559. я на это поначалу не обратил внимания, при рестарте с nginx - та же картина, но потом добавил в /etc/host и в httpd.conf директиву ServerName^
  560.  
  561.  
  562. <b>/etc/hosts ===============================================================</b>
  563. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  564. ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  565. 1.2.3.4 lermont domain.com localhost
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement