This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
apache2配置 [2017/12/10 08:04] jordan |
apache2配置 [2023/03/08 16:09] (current) xujianglong ↷ Page moved from 内部资料:apache2配置 to apache2配置 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | # Apache2配置 | + | ====== |
- | ## Apache2基本配置 | + | ===== Apache2基本配置 |
- | ## Apache2 PHP配置 | + | ===== Apache2 PHP配置 |
首先安装apache的php模块,然后启用 | 首先安装apache的php模块,然后启用 | ||
- | * 安装php模块,Ubuntu下使用`apt install libapache2-mod-php`安装 | + | |
- | * 启用php模块,`a2enmod php`或`a2enmod php7.0` | + | * 启用php模块,'' |
+ | |||
+ | ===== Apache2端口转发 ===== | ||
+ | |||
+ | 在配置文件(Ubuntu下配置文件位于/ | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | ProxyPreserveHost On | ||
+ | ProxyRequests Off | ||
+ | ServerName www.example.com | ||
+ | ServerAlias example.com | ||
+ | ProxyPass / http:// | ||
+ | ProxyPassReverse / http:// | ||
+ | </ | ||
+ | </ | ||
+ | 安装启用proxy和http_proxy两个模块(例如Ubuntu下执行'' | ||
+ | |||
+ | ===== Apache配置免费ssl证书 ===== | ||
+ | |||
+ | [[https:// | ||
+ |