首页 > Web开发 > 详细

宝塔apache配置

时间:2018-03-13 14:29:23      阅读:329      评论:0      收藏:0      [点我收藏+]

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配置

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!