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的更多相关文章

  1. 【转】Apache 配置虚拟主机三种方式

    Apache 配置虚拟主机三种方式  原文博客http://www.cnblogs.com/hi-bazinga/archive/2012/04/23/2466605.html 一.基于IP 1. 假 ...

  2. apache配置虚拟主机后,启动速度慢

    apache配置虚拟主机后,启动速度慢且提示“the requested operation has failed” 可以通过在cmd下启动,来查找问题(命令中的“apache2.2”,是服务名,根据 ...

  3. apache配置虚拟主机的三种方式

    Apache 配置虚拟主机三种方式   一.基于IP 1. 假设服务器有个IP地址为192.168.1.10,使用ifconfig在同一个网络接口eth0上绑定3个IP: [root@localhos ...

  4. lamp apache配置虚拟主机

    You don't have permission to access /index.php on this server

  5. Apache配置虚拟主机后让其他电脑访问

    关于Apache配置虚拟主机后在局域网中让其他电脑访问 #test1# NameVirtualHost *:80         ServerName  www.t1.com     Document ...

  6. [Linux]Apache配置虚拟主机

    Apache 配置虚拟主机的方式很多,种类也很多,主要分为两类:   基于名称的虚拟主机 (每个 IP 多个站点) 基于 IP 的虚拟主机 (每个 IP 一个站点) 基于名称的虚拟主机:  www.2 ...

  7. windows环境利用apache 配置虚拟主机

    windows环境利用apache 配置虚拟主机 1.改动http.host #LoadModule vhost_alias_module modules/mod_vhost_alias.so #In ...

  8. apache配置虚拟主机

    步骤如下: 1.在配置文件httpd.conf中启用httpd-vhosts.conf 找到# Virtual hosts将Include conf/extra/httpd-vhosts.conf前的 ...

  9. Apache配置虚拟主机后,不能访问localhost的问题

    今天想试用一下php7,但是发现php7只支持Apache2.4版本,而我电脑上的Apache是2.2版本,为了想尝鲜,就必须去下载新的Apache2.4 php7和apache2.4安装整合以后,l ...

随机推荐

  1. 关于IDEA 单元测试时 【empty test suite】异常的分析!!

    IDEA功能很强大,配置很操蛋,自从用了之后掉了很多坑!!! 这几天要用单元测试,方法完好但是就是一直报empty test suite ,WTF,类找不到 在网上反复的找答案都没有合适 静下心想想, ...

  2. 自定义View/ViewGroup的步骤和实现

    1.设置属性(供XML调用) 在res目录新建attrs.xml文件 <?xml version="1.0" encoding="utf-8"?> ...

  3. SVM python小样例

    SVM有很多种实现,但是本章只关注其中最流行的一种实现,即序列最小化(SMO)算法在此之后,我们将介绍如何使用一种称为核函数的方式将SVM扩展到更多的数据集上基于最大间隔的分割数据优点:泛化错误率低, ...

  4. 可实现一键分享到多个平台(微信,微博,qq空间,人人等)

    友推是一款是面向移动应用的SDK分享组件,提供给开发者集成使用.通过友推,开发者可以轻松集成社会化分享功能,同时创建及管理推荐好友使用您应用的推荐奖励活动,用户推荐好友安装使用您的应用即可获得推荐奖励 ...

  5. 我给女朋友讲编程总结建议篇,怎么学习html和css

    总共写了11篇博客了,7篇讲html的,4篇讲网络的.不敢说写的多么好吧,最起码的是我迈出了写作的第一步,写作的过程中了解了一些其他的知识,比如SEO.几种重定向等,由于个人能力和见识有限,写出来的东 ...

  6. BZOJ3884 上帝与集合的正确用法 【欧拉定理】

    题目 对于100%的数据,T<=1000,p<=10^7 题解 来捉这道神题 欧拉定理的一般形式: \[a^{m} \equiv a^{m \mod \varphi(p) + [m \ge ...

  7. HDU 5253 最小生成树 kruscal

    Description 老 Jack 有一片农田,以往几年都是靠天吃饭的.但是今年老天格外的不开眼,大旱.所以老 Jack 决定用管道将他的所有相邻的农田全部都串联起来,这样他就可以从远处引水过来进行 ...

  8. iOS 代理为啥要用weak修饰?

    在开发中我们经常使用代理,或自己写个代理,而代理属性都用weak(assign)修饰,看过有些开发者用strong(retain),但并没发现有何不妥,也不清楚weak(assign)与strong( ...

  9. pat 团体天梯赛 L2-006. 树的遍历

    L2-006. 树的遍历 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历 ...

  10. javascript草稿

    原文发布时间为:2011-06-01 -- 来源于本人的百度文章 [由搬家工具导入]   @MyHelper.Script("jquery-1.6.1.min.js", Url)  ...