码迷,mamicode.com
首页 > Web开发 > 详细

宝塔apache配置

时间:2018-03-13 15:47:17      阅读:5565      评论:0      收藏:0      [点我收藏+]

标签:git   radmin   down   apach   license   dex   eth   body   index.php   

apache配置

<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot "/www/wwwroot/mayibang.co/public"
    ServerName 180e6dfd.mayibang.co
    ServerAlias mayibang.co www.mayibang.co admin.mayibang.co
    errorDocument 404 /404.html
    ErrorLog "/www/wwwlogs/mayibang.co-error_log"
    CustomLog "/www/wwwlogs/mayibang.co-access_log" combined
    
    #DENY FILES
     <Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
       Order allow,deny
       Deny from all
    </Files>
    
    #PHP
    <FilesMatch \.php$>
            SetHandler "proxy:unix:/tmp/php-cgi-72.sock|fcgi://localhost"
    </FilesMatch>
    
    #PATH
    <Directory "/www/wwwroot/mayibang.co/public">
        SetOutputFilter DEFLATE
        Options FollowSymLinks
        AllowOverride All
        Require all granted
        DirectoryIndex index.php index.html index.htm default.php default.html default.htm
    </Directory>
</VirtualHost>

.haccess配置

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

宝塔apache配置

标签:git   radmin   down   apach   license   dex   eth   body   index.php   

原文地址:https://www.cnblogs.com/xielisen/p/8556213.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!