<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/www/wwwroot/api.com"
ServerName api.com
ServerAlias api.com
#errorDocument 404 /404.html
ErrorLog "/www/wwwlogs/api.com-error_log"
CustomLog "/www/wwwlogs/api.com-access_log" combined
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
<FilesMatch \.php$>
SetHandler "proxy:unix:/tmp/php-cgi-74.sock|fcgi://localhost"
</FilesMatch>
#PATH
<Directory "/www/wwwroot/api.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.php index.html index.htm default.php default.html default.htm
</Directory>
</VirtualHost>
标签:index,www,配置文件,html,api,apache,php,com
From: https://www.cnblogs.com/xuyaoxiang1991/p/17899608.html