1.自己下Apache + php安装包搭起的服务有时候莫名卡顿,百度后可以尝试下面这种方法
2.后来听别的同事在用phpstudy,自己也尝试了一下配置
1)、加载ssi模块(默认将改模块注释掉)。
LoadModule ssl_module modules/mod_ssl.so
2)、 添加你需要的文件类型(默认好像也是注释掉),
AddType text/html .shtml .html .htm
AddOutputFilter INCLUDES .shtml .html .htm
3. 在项目所在路径下配置如下,即上面后缀名的静态页面即可以使用include这些语法,引入公共模块
4.不要求后缀名,既不用输入后缀名,也会去匹配到对应页面
5.多项目时(多站点配置还没有尝试有区别)
Listen 90
<VirtualHost _default_:80>
DocumentRoot "D:\hqqsoft\phpstudy\PHPTutorial\WWW"
<Directory "D:\hqqsoft\phpstudy\PHPTutorial\WWW">
Options +Indexes +FollowSymLinks +ExecCGI +INCLUDES +IncludesNOEXEC +MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:90>
DocumentRoot "E:\project\DIS"
ServerName dis
ServerAlias
<Directory "E:\project\DIS">
Options +Indexes +FollowSymLinks +ExecCGI +INCLUDES +IncludesNOEXEC +MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
访问localhost:90也可渲染出正确的网页;
网友评论