Setup Apache2 in Debian 9 and enable two ports for two sites
root@debian:~# apt-get install apache2
root@debian:~# cd /etc/apache2/
root@debian:/etc/apache2# ls -l
total 80
-rw-r--r-- 1 root root 7224 Jun 20 15:29 apache2.conf
drwxr-xr-x 2 root root 4096 Jul 8 12:06 conf-available
drwxr-xr-x 2 root root 4096 Jul 8 12:06 conf-enabled
-rw-r--r-- 1 root root 1782 Jun 20 15:25 envvars
-rw-r--r-- 1 root root 31063 Jan 25 16:16 magic
drwxr-xr-x 2 root root 12288 Jul 11 10:05 mods-available
drwxr-xr-x 2 root root 4096 Jul 11 10:05 mods-enabled
-rw-r--r-- 1 root root 332 Jul 8 11:40 ports.conf
drwxr-xr-x 2 root root 4096 Jul 11 10:21 sites-available
drwxr-xr-x 2 root root 4096 Jul 11 10:14 sites-enabled
root@debian:/etc/apache2# vi ports.conf
Listen 80
Listen 8080
<IfModule ssl_module>
root@debian:/etc/apache2# cd sites-enabled/
root@debian:/etc/apache2/sites-enabled# cp 000-default.conf 001-default.conf
root@debian:/etc/apache2/sites-enabled# vi 001-default.conf
<VirtualHost *:8080>
DocumentRoot /var/www/mysite
root@debian:/etc/apache2/sites-enabled# apachectl -k restart
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, we have two site could be accessed. http://127.0.0.1, http://127.0.0.1:8080
Setup Apache2 in Debian 9 and enable two ports for two sites的更多相关文章
- [R] /usr/share/doc/apache2/README.Debian.gz
Contents======== Apache2 Configuration under Debian GNU/Linux Files and Directories in '/etc/apache2 ...
- Installing OwnCloud 9 on Debian 8
原文:https://www.howtoforge.com/tutorial/owncloud_9-installation-on-debian_8/?utm_source=tuicool&u ...
- centos apache2.4.6 apache https配置
错误描述: SSL 接收到一个超出最大准许长度的记录. 错误代码:SSL_ERROR_RX_RECORD_TOO_LONG 原因: root@iZwz93telmwbh624e5zetqZ:~# ap ...
- Ubuntu 16.04 LAMP server 指南 - 配置 Apache2.4,PHP7,和MariaDB(而不是MySQL)
翻译自:https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/ 昨天在虚 ...
- Apache2 在Linux环境下的安装
安装Apache2: apt-get install apache2 启动Apache2服务: service apache2 start 在终端运行启动后,打开浏览器URL访问 http://loc ...
- opensuse 安装APACHE2+MYSQL+PHP5
sudo zypper in apache2-mod_php5 apache2 mariadb 装好后, 记得启动APACHE2对PHP的支持: a2enmod php5 默认mysql密码为空, 可 ...
- 开启apache2的ssl访问功能
Ubuntu 20.04 1. Apache2默认安装的时候,ssl模块是不启用的.开启命令: $ sudo apt install apache2 #安装$ sudo a2enmod ssl #开启 ...
- Apache multiple domains setup
Running several name-based web sites on a single IP address. Your server has a single IP address, an ...
- Ubuntu 16.04 LAMP server tutorial with Apache 2.4, PHP 7 and MariaDB (instead of MySQL)
https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/ This tut ...
随机推荐
- flask第十三篇——url注意事项
先和大家说一下常用的请求方法 get:只是从服务器获取数据,不会对服务器的状态或数据产生任何影响: get方法的参数是放在URL中传递的. post:会对服务器的状态或数据产生影响:通过body形式进 ...
- 【最全 干货 实例】 缓存手册(Memcached、redis、RabbitMQ)
http://www.cnblogs.com/suoning/p/5807247.html 本章内容: Memcached 简介.安装.使用 Python 操作 Memcached 天生支持集群 re ...
- Nchan 实时消息内置变量
以下参考官方文档: $nchan_channel_idThe channel id extracted from a publisher or subscriber location requ ...
- 编写浏览器和Node.js通用的JavaScript模块
长期以来JavaScript语言本身不提供模块化的支持, ES6中终于给出了 from, import等关键字来进行模块化的代码组织. 但CommonJS.AMD等规范已经被广为使用,如果希望你的Ja ...
- Web 漏洞分析与防御之 XSS(一)
原文地址:Web 漏洞分析与防御之 XSS(一) 博客地址:http://www.extlight.com 一.全称 跨站脚本攻击(Cross Site Scripting) 二.原理 通过在网站中的 ...
- expdp实现oracle远程服务器导出到本地
expdp导出 expdp user/pwd@orcl directory=dd network_link=dblink dumpfile=fileName.dmp //user为本地用户名 //ne ...
- Unit06: 外部对象概述 、 window 对象 、 document 对象
Unit06: 外部对象概述 . window 对象 . document 对象 小代码演示: <!DOCTYPE html> <html> <head> < ...
- JAVASE02-Unit012: Unit07: XML语法 、 XML解析
Unit07: XML语法 . XML解析 emplist.xml <?xml version="1.0" encoding="UTF-8"?> & ...
- 后台判断ajax请求的请求后字段
headers设置:X-Requested-With:XMLHttpRequest 后台我就是根据这个来判断的
- nginx限制请求之一:(ngx_http_limit_conn_module)模块
相关文章: <高可用服务设计之二:Rate limiting 限流与降级> <nginx限制请求之一:(ngx_http_limit_conn_module)模块> <n ...