HTTPS配置伪静态
来源:互联网 发布:vscode 运行npm命令 编辑:程序博客网 时间:2024/06/08 23:15
因为要把一个网站项目导入到另一台服务器,在部署上去之后忽然想到要用的是443端口(https)进行访问,而且这个网站项目用到的是伪静态。以前想到配置80端口的伪静态的时候,一般就是直接修改apache的配置文件httpd.conf 把LoadModule rewrite_module modules/mod_rewrite.so
的注释‘#’去掉即可 但是这是80的办法,443的该怎么解决呢?
其实办法很简单 之前应该讲过443端口的配置文件是在/apache/conf/extra/httpd-ssl.conf里,我们找到这个文件进行编辑,这里拿我服务器上的配置文件举例
<VirtualHost _default_:443># General setup for the virtual hostProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/yjdata/www/www/$1#ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/usr/local/apache2/htdocs/$1DirectoryIndex index.html index.phpDocumentRoot "/yjdata/www/www/"#DocumentRoot "/usr/local/apache2/htdocs/"ServerName www.hyfwechat.cn:443ServerAdmin hsy@heyifu-pay.comErrorLog "/usr/local/apache2/logs/error_log"TransferLog "/usr/local/apache2/logs/access_log
这里的配置是不是跟httpd.conf里的很像
#<VirtualHost *:80># ServerAdmin webmaster@dummy-host.example.com# DocumentRoot /www/docs/dummy-host.example.com# ServerName dummy-host.example.com# ErrorLog logs/dummy-host.example.com-error_log# CustomLog logs/dummy-host.example.com-access_log common#</VirtualHost>
但是我们的重点不在这里,放这段代码块儿在这里只是为了提醒大家千万不能在这块儿(<VirtualHost _default_:443></VirtualHost>
)添加伪静态配置 否则重启apache肯定会报错
既然这块儿不可以,我们就在它外面配置就ok了
<Directory /> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all</Directory>
把这块儿的代码复制到VirtualHost代码块儿之外就可以,然后重启apache https伪静态就配置完成了
小结:如果还不可以的话,请注意VirtualHost代码块儿里是否添加了
DirectoryIndex index.html index.php
阅读全文
0 0
- HTTPS配置伪静态
- Apache配置伪静态
- IIS伪静态配置
- URLRewriter配置伪静态
- apache 伪静态配置
- 伪静态配置
- PHP伪静态配置
- apache配置伪静态
- MVC 伪静态配置
- apache伪静态配置
- nginx 配置伪静态
- 配置PHPCMS伪静态
- Nginx伪静态配置
- PHP伪静态配置
- 伪静态配置开启
- 伪静态配置开启
- 伪静态配置开启
- 伪静态配置
- java.lang.UnsatisfiedLinkError: E:\apache-tomcat-7.0.59\bin\tcnative-1.dll: Can't load IA 32-bit .dl
- mysql导入导出sql文件 window下 1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u dbuser -p dbname >
- 欢迎使用CSDN-markdown编辑器
- leedcode
- 设计模式之——状态设计模式
- HTTPS配置伪静态
- Thinkphp整合swiftmailer实现邮件发送
- 将xml转为json
- 10 财政收入影响因素分析及预测模型
- Ubuntu环境QT出现:-1: error: cannot find -lGL(已解决)
- (转)ViewPager 如何得到当前的Fragment (使用FragmentPagerAdapter)
- POJ2752 Seek the Name, Seek the Fame(前后缀最大匹配,kmp)
- 判断python字典中key是否存在的两种方法
- 混合高斯模型