虚拟主机中对PHP的特殊设置_php基础
程序员文章站
2022-03-10 08:54:00
...
虚拟主机设置
ServerAdmin webmaster@hostmachine.com
DocumentRoot /www/virtual.com/htdocs
ServerName www.virtual.com
UserDir /www/virtual.com/htdocs
ScriptAlias /cgi-bin/ /www/virtual.com/cgi-bin/
ErrorLog /www/virtual.com/logs/error_log
CustomLog /www/virtual.com/logs/access_log common
目录设置
# 对该虚拟主机设置是否使用php
php_engine On
# 设置php出错信息的调试级别
php_error_reporting 1
# 设置是否记录php出错日志
php_log_errors On
# 设置php的出错日志文件
php_error_log /www/virtual.com/logs/php_error_log
# 设置一个php线程的最长存活时间
php_max_execution_time 180
# 设置用户临时上载目录
php_upload_tmp_dir /www/virtual.com/htdocs/tmp
# 设置包含头文件
php_include_path /www/virtual.com/htdocs/include
可执行目录设置
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
ServerAdmin webmaster@hostmachine.com
DocumentRoot /www/virtual.com/htdocs
ServerName www.virtual.com
UserDir /www/virtual.com/htdocs
ScriptAlias /cgi-bin/ /www/virtual.com/cgi-bin/
ErrorLog /www/virtual.com/logs/error_log
CustomLog /www/virtual.com/logs/access_log common
目录设置
# 对该虚拟主机设置是否使用php
php_engine On
# 设置php出错信息的调试级别
php_error_reporting 1
# 设置是否记录php出错日志
php_log_errors On
# 设置php的出错日志文件
php_error_log /www/virtual.com/logs/php_error_log
# 设置一个php线程的最长存活时间
php_max_execution_time 180
# 设置用户临时上载目录
php_upload_tmp_dir /www/virtual.com/htdocs/tmp
# 设置包含头文件
php_include_path /www/virtual.com/htdocs/include
可执行目录设置
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all