APACHE 配置虚拟主机和HTTPS
prepare the running env of os
make sure you are using redhat or centen os 7.5
cat /etc/redhat-release
yum install git
yum install openssl
prepare the running env apache
yum install httpd
yum install mod_wsgi
yum install mod_ssl
config cert for apache refer to https://help.aliyun.com/knowledge_detail/95493.html?spm=5176.2020520154.cas.40.6af0yuzByuzByE
how to run it at appche httpd2.4.6 of Redhat7.5
git the code at /app/ and it will at
/app/yourproject/
add the config of follow to /etc/httpd/conf/httpd.conf
support python web wsgi
<VirtualHost *:80>
DocumentRoot "/appvol/SigninWork"
ServerName checkin.robin.org.cn
#ServerAlias checkin.robin.org.cn
WSGIScriptAlias / /appvol/SigninWork/code.py/
Alias /static /appvol/SigninWork/static/
AddType text/html .py
#对于80端口开启RUL重定向
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [L,R]
<Directory "/appvol/SigninWork">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/appvol/SigninWork"
ServerName checkin.robin.org.cn
#ServerAlias www.robin.org.cn
WSGIScriptAlias / /appvol/SigninWork/code.py/
Alias /static /appvol/SigninWork/static/
AddType text/html .py
<Directory "/appvol/SigninWork">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
support php
<VirtualHost *:80>
DocumentRoot "/appvol/wordpress_blog"
ServerName robin.org.cn
ServerAlias www.robin.org.cn blog.robin.org.cn
AddType text/html .php
#对于80端口开启RUL重定向
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [L,R]
<Directory "/appvol/wordpress_blog">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/appvol/wordpress_blog"
ServerName robin.org.cn
ServerAlias www.robin.org.cn blog.robin.org.cn
AddType text/html .php
<Directory "/appvol/wordpress_blog">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
APACHE 配置虚拟主机和HTTPS的更多相关文章
- 【转】Apache 配置虚拟主机三种方式
Apache 配置虚拟主机三种方式 原文博客http://www.cnblogs.com/hi-bazinga/archive/2012/04/23/2466605.html 一.基于IP 1. 假 ...
- apache配置虚拟主机后,启动速度慢
apache配置虚拟主机后,启动速度慢且提示“the requested operation has failed” 可以通过在cmd下启动,来查找问题(命令中的“apache2.2”,是服务名,根据 ...
- apache配置虚拟主机的三种方式
Apache 配置虚拟主机三种方式 一.基于IP 1. 假设服务器有个IP地址为192.168.1.10,使用ifconfig在同一个网络接口eth0上绑定3个IP: [root@localhos ...
- lamp apache配置虚拟主机
You don't have permission to access /index.php on this server
- Apache配置虚拟主机后让其他电脑访问
关于Apache配置虚拟主机后在局域网中让其他电脑访问 #test1# NameVirtualHost *:80 ServerName www.t1.com Document ...
- [Linux]Apache配置虚拟主机
Apache 配置虚拟主机的方式很多,种类也很多,主要分为两类: 基于名称的虚拟主机 (每个 IP 多个站点) 基于 IP 的虚拟主机 (每个 IP 一个站点) 基于名称的虚拟主机: www.2 ...
- windows环境利用apache 配置虚拟主机
windows环境利用apache 配置虚拟主机 1.改动http.host #LoadModule vhost_alias_module modules/mod_vhost_alias.so #In ...
- apache配置虚拟主机
步骤如下: 1.在配置文件httpd.conf中启用httpd-vhosts.conf 找到# Virtual hosts将Include conf/extra/httpd-vhosts.conf前的 ...
- Apache配置虚拟主机后,不能访问localhost的问题
今天想试用一下php7,但是发现php7只支持Apache2.4版本,而我电脑上的Apache是2.2版本,为了想尝鲜,就必须去下载新的Apache2.4 php7和apache2.4安装整合以后,l ...
随机推荐
- Spring核心技术(十四)——ApplicationContext的额外功能
在前文的介绍中我们知道,org.springframework.beans.factory包提供了一些基本的功能来管理和控制Bean,甚至通过编程的方式来实现.org.springframework. ...
- OpenCV学习笔记(六) 滤波器 形态学操作(腐蚀、膨胀等)
转自:OpenCV 教程 另附:计算机视觉:算法与应用(2012),Learning OpenCV(2009) 平滑图像:滤波器 平滑 也称 模糊, 是一项简单且使用频率很高的图像处理方法.平滑处理的 ...
- Redis实现之RDB持久化(二)
RDB文件结构 在Redis实现之RDB持久化(一)这一章中,我们介绍了Redis服务器保存和载入RDB文件的方法,在这一节,我们将对RDB文件本身进行介绍,并详细说明文件各个部分的结构和意义.图1- ...
- python 二——函数、装饰器、生成器、面向对象编程(初级)
本节内容 1.函数 2.装饰器 3.生成器 4.类 一.函数 函数式:将某功能代码封装到函数中,日后便无需重复编写,仅调用函数即可 面向对象:对函数进行分类和封装,让开发“更快更好更强...” 函数式 ...
- leetcode 【 Remove Duplicates from Sorted Array II 】python 实现
题目: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For ex ...
- MongoDB快速入门学习笔记5 MongoDB的文档修改操作
db.集合名称.update({query},{update},upsert, multi})query:过滤条件update:修改内容upsert:如果不存在查询条件查出的记录,是否插入一条数据,默 ...
- [转]jQuery DOM Ready
一直以来,各种JS最佳实践都会告诉我们,将JS放在HTML的最后,即</body>之前,理由就是:JS会阻塞下载,而且,在JS中很有可能有对DOM的操作,放在HTML的最后,可以尽可能的保 ...
- jsonp的原理及应用
https://blog.csdn.net/u011897301/article/details/52679486
- 浏览器不支持JavaScript怎么办
使用 noscript 标签,给用户提醒即可 <body> <noscript>需要js支持</noscript> </body>
- 【bzoj3687】简单题 背包dp+STL-bitset
题目描述 小呆开始研究集合论了,他提出了关于一个数集四个问题:1.子集的异或和的算术和.2.子集的异或和的异或和.3.子集的算术和的算术和.4.子集的算术和的异或和.目前为止,小呆已经解决了前三个问题 ...