jecopeng的个人博客分享 http://blog.sciencenet.cn/u/jecopeng

博文

ubuntu系统中Apache2配置虚拟主机和反向解析

已有 1801 次阅读 2017-9-19 16:52 |系统分类:科研笔记

I Enviroments

Ubuntu 14.04 LTS/16.04 LTS

Apache2


II Steps

$ sudo a2enmod proxy proxy_http

# Load modols of proxy,proxy_http

$ sudo vi /etc/apache2/site-available/000-default.conf

# Open configuration file.


III Editor

Insert the following contents between <VirtualHost *:80> and </VirtualHost>

-----------------------<Begin>--------------------------

ServerAdmin webmaster@localhost

ServerName localhost

ServerAlias localhost


ProxyRequests off

DocumentRoot /var/www/html


<Proxy *>

 Order deny,allow

 Allow from all

</Proxy>


ProxyPass /owncloud/ !

# do pass all pages under '/' to 'http://localhost:3000/'

ProxyPass / http://localhost:3000/

# do pass all pages under '/' to 'http://localhost:3000/'

ProxyPassReverse / http://localhost:3000/

# do reverse all pages under 'http://localhost:3000/' to '/'

-----------------------<Begin>--------------------------



https://blog.sciencenet.cn/blog-427115-1076743.html

上一篇:Ubuntu安装和维护nodejs和express
下一篇:ubuntu 16.04 配置自己的PPTP服务器
收藏 IP: 123.138.79.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (2 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-25 06:40

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部