lipeng 发表于 2018-11-17 12:11:16

centos7安装配置apache(httpd)

ServerRoot "/etc/httpd"  Listen 80
  Include conf.modules.d/*.conf
  User apache
  Group apache
  ServerAdmin root@localhost
  ServerName dollarphp
  
  AllowOverride none
  Require all denied
  Order Deny,Allow
  Allow from 192.168.8.1/24
  Deny from All
  LimitRequestBody 10485760
  
  DocumentRoot "/var/www/html"
  
  AllowOverride None
  Require all granted
  
  
  Header set Access-Control-Allow-Origin *
  Options Indexes FollowSymLinks
  IndexStyleSheet "/css/style.css"
  IndexOptions FancyIndexing HTMLTable ScanHTMLTitles FoldersFirst NameWidth=85 DescriptionWidth=128 IconWidth=16 IconHeight=16 VersionSort Charset=UTF-8
  AllowOverride all
  Require all granted
  AcceptPathInfo on
  
  
  DirectoryIndex index.php index.html
  
  
  Require all denied
  
  ErrorLog "logs/error_log"
  LogLevel warn
  
  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  LogFormat "%h %l %u %t \"%r\" %>s %b" common
  
  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  
  CustomLog "logs/access_log" combined
  
  
  ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  
  
  AllowOverride None
  Options None
  Require all granted
  
  
  TypesConfig /etc/mime.types
  AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
  AddType text/html .shtml
  AddType application/x-httpd-php .php .phtml .php3 .inc
  AddOutputFilter INCLUDES .shtml
  
  AddDefaultCharset UTF-8
  
  MIMEMagicFile conf/magic
  
  
  SetOutputFilter DEFLATE
  SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
  SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
  SetEnvIfNoCase Request_URI .(?:pdf|doc|avi|mov|mp3|rm)$ no-gzip dont-vary
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
  AddOutputFilterByType DEFLATE application/x-javascript
  
  EnableSendfile on
  IncludeOptional conf.d/*.conf
  
  ServerName www.dollarphp.com
  DocumentRoot "/var/www/html/dollarphp/"
  DirectoryIndex index.php index.html
  
  Header set Access-Control-Allow-Origin *
  Options FollowSymLinks
  AllowOverride All
  Require all granted
  
  

页: [1]
查看完整版本: centos7安装配置apache(httpd)