编辑 /usr/local/apache2/conf/httpd.conf 文件时要注意:

找到:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在后面添加:
AddType application/x-httpd-php .php(使Apcche支持PHP)
AddType application/x-httpd-php-source .php5

找到: <IfModule dir_module> DirectoryIndex index.html </IfModule>
添加: <IfModule dir_module> DirectoryIndex index.html index.php </IfModule>

找到: #ServerName www.example.com:80
修改为: ServerName 127.0.0.1:80或者ServerName localhost:80 记得要去掉前面的“#”


修改默认的Web站点目录

找到:DocumentRoot "/usr/local/apache2/htdocs"
修改为:DocumentRoot "/home/www/WebSite" --该目录为自己创建的目录

找到:<Directory "/usr/local/apache2/htdocs">
修改为:<Directory "/home/www/WebSite">

相关文章:

  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-06
猜你喜欢
  • 2021-08-07
  • 2021-12-26
  • 2021-06-17
  • 2021-12-09
  • 2021-12-08
  • 2021-10-26
相关资源
相似解决方案