您好,欢迎光临! 推荐您使用Chrome浏览器访问本站。

XAMPP中设置多个网站

972 views
XAMPP中设置多个网站xampp 是一个非常方便的本地 apache + php + mysql 的调试环境,在本地安装测试 WordPress等各种博客、论坛程序非常方便。今天我们来给大家介绍一下,如何使用 XAMPP 在本地进行安装多个网站。 一般情况下,我们只需要网站程序放到 xampp/htdoc 目录下,然后在浏览器里输入 ip 地址http://127.0.0.1/ 或者输入域名 http://localhost/ 就可以了。但是这样我们只能使用一个程序,建立一个网站。如果我们想要测试测试不同的程序,比如一个WordPress的网站,一个Discuz!的论坛,再加上一个ShopEx的网店,那就比较麻烦了。我们这篇文章,......

用.htaccess文件保护个人目录

934 views
用.htaccess文件保护个人目录用.htaccess文件保护个人目录 用.htaccess文件可以解决上面提出的问题。你可以在任何许可权限较为宽松(如760,766,775以及777)的目录中添加.htaccess文件,也可以阻止某个目录和它所有子目录中的脚本执行,还可以禁止某一类型文件外的其它所有文件的写入。 保护特定文件类型 以下代码段可禁止在目录中使用.jpeg, .jpg, .png. 以及 .gif文件外所有文件: <Files ^(*.jpeg|*.jpg|*.png|*.gif)> order deny,allow deny from all </Files> 下面这个代码示例用<FilesMatch>指令来指定能够被访问的文件类型......

Apache Mod_Rewrite URL重写 伪静态化

1,042 views
Apache Mod_Rewrite URL重写 伪静态化测试环境: Windows xp XAMPP for windows   配置步骤: 第一步:找到apache的配置文件httpd.conf(文件在conf目录下) 第二步:让服务器支持mod_rewrite 打开httpd.conf,找到#LoadModule rewrite_module modules/mod_rewrite.so把#去掉 找到<Directory />下AllowOverride None 改成 AllowOverride All 对于不同的网址,需要在APACHE中增加如下内容 <Directory “D:/xampp/htdocs/test”> AllowOverride All </Directory> 第三步:重启apache服务器。 第四步:在需要URL重写的网站目录下放一个.htaccess文件......

Apache gzip

1,000 views
Apache gzipgzip可以极大的加速网站。关于gzip的具体介绍可参看:gzip-百度百科 。 下面只介绍在WAMP环境下如何开启apache的gzip。 方法如下: 1. httpd.conf中打开deflate_Module和headers_Module模块 2. httpd.conf中添加: <IfModule deflate_module>     SetOutputFilter DEFLATE     # Don’t compress images and other     SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary     SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary     SetEnvIfNoCase Request_URI .(?:pdf|doc)......

外网访问XAMPP phpMyAdmin失败 解决方法

2,874 views
外网访问XAMPP phpMyAdmin失败 解决方法 外网访问XAMPP出现如下错误: New XAMPP security concept: Access to the requested directory is only available from the local network. This setting can be configured in the file “httpd-xampp.conf”. 解决办法: 打开httpd-xampp.conf(/xampp/apache/conf/extra/httpd-xampp.conf) 找到以下内容 <LocationMatch “^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))”> Order deny,allow Deny from all Allow from ::1 127.0.0.0/8 \ fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.......