Skip to content

【答疑】28页

lei xia edited this page Dec 21, 2017 · 3 revisions

问题

不知道 page 28是不是少了 几行 

1.确认httpd.conf配置文件中加载了mod_rewrite.so 

 模块,加载的方法是去掉mod_rewrite.so 

前面的注释#号
2.httpd.conf中的Allowoverride  None 将None改为All

回复

  1. httpd.conf123行已经默认开启mod_rewrite.so模块,故书本中未提出
  2. httpd-vhosts.conf初始内容如下(未开启upupw的s1选项)
<VirtualHost *:80>
    DocumentRoot "X:/upupw/htdocs"
    ServerName 127.0.0.1:80
    ServerAlias localhost
    ServerAdmin webmaster@localhost
    DirectoryIndex index.html index.htm index.php default.php app.php u.php
    ErrorLog logs/localhost_error.log
    CustomLog logs/localhost_access_%Y%m%d.log comonvhost
	php_admin_value open_basedir "X:\upupw\htdocs\;X:\upupw\memcached\;X:\upupw\phpmyadmin\;X:\upupw\temp\;C:\Windows\Temp\"
<Directory "X:/upupw/htdocs">
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
<LocationMatch "/(inc)/(.*)$">
    Require all denied
</LocationMatch>
<LocationMatch "/(attachment|attachments|uploadfiles|avatar)/(.*).(php|php5|phps|asp|aspx|jsp)$">
    Require all denied
</LocationMatch>
</VirtualHost>

可以看到默认已经AllowOverride All

书籍答疑

Clone this wiki locally