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 ...
随机推荐
- json对象数据列数
// var len = data.length(); // alert(data.Rows.length); var colCount = (function count(){//一条记录中有几个键 ...
- 3 - JVM随笔分类(gc.log ,VisualVM插件介绍,VisualVM远程连接方式介绍)
gc.log 354.2 KB 对于对应用的监控上可以使用Jdk自带的VisualVM来做可视化监控,可以查看当前服务应用进程的堆大小的走向,以及类的加载数量等,除此之外,VisualVM可以支持很多 ...
- C#入门篇5-7:流程控制语句 continue语句
#region continue语句 public class ContinueApp { public static void Fun1() { //标签打印显示1…30,若能被3整除则不打印. ; ...
- IOS笔记050-事件处理
IOS事件处理 1.触摸事件 2.加速器事件:重力感应,旋转等事件 3.远程遥控事件:蓝牙线控,耳机线控等 触摸事件 响应者对象 只有继承了UIResponder得对象才能接收并处理事件 常见类有:U ...
- 《HTTP协议详解》读书笔记---请求篇之响应状态码
在接收和解释请求消息后,服务器返回一个http响应消息.它也分为3个部分:状态行.消息报头.响应正文,格式如下: HTTP-VersionStatus-CodeReason-PhraseCRLF(CR ...
- gcc学习记录2——多输入文件
首先有两个.c文件:circle.c和circulararea.c. 分别对两个源文件生成目标文件,circle.o和circulararea.o. gcc -c circle.c circularr ...
- nginx的进程模型
nginx采用的也是大部分http服务器的做法,就是master,worker模型,一个master进程管理站个或者多个worker进程,基本的事件处理都是放在woker中,master负责一些全局初 ...
- nyoj 题目14 会场安排问题
会场安排问题 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办.小刘的工 ...
- 【转】unity自带寻路Navmesh入门教程(二)
http://liweizhaolili.blog.163.com/blog/static/16230744201271210237616/ 上一节简单介绍了NavMesh寻路的基本用法,这次来介绍一 ...
- 使用CoreLocation进行定位(Swift版)
在应用开发中,很多情况需要我们获取到当前的位置和高度信息,方便搜索周边,查看周边相同应用等,一切与定位有关的都得使用CoreLocation库,而且,系统是不允许第三发定位的,当然可以使用第三方对其封 ...