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

 

posted @ 2017-07-11 22:54 devcfei 阅读(171) 评论(0) 推荐(0) 编辑

成员函数指针和模板混用,折腾。。

摘要: template class CFooImpl { protected: void callfoo() { T* t = static_cast(this); t->foo(); } void callfoo(void(T::* f)()) { // how to call f ?? ... 阅读全文
posted @ 2016-05-22 22:24 devcfei 阅读(153) 评论(0) 推荐(0) 编辑

VS2015 create a C++ console application based on WinRT

摘要: 1. Enable /ZW 2. Disable /Gm 3. #using C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcpackages;C:\Program Files (x86)\Windows Kits\10\UnionM 阅读全文
posted @ 2016-05-09 22:20 devcfei 阅读(383) 评论(0) 推荐(0) 编辑

Bug of VS2015+WDK

摘要: 1> Signability test failed.1> 1> Errors:1> 22.9.7: DriverVer set to incorrect date (postdated DriverVer not allowed) in \ahci.inf. The current date (U... 阅读全文
posted @ 2015-12-15 22:42 devcfei 阅读(190) 评论(0) 推荐(0) 编辑

Linux - GIT

摘要: Overview#apt-get install git-coreHow to push/pull repos without passwordOn servergit@debian:~$ ssh - keygen - t rsaGenerating public / private rsa key... 阅读全文
posted @ 2015-11-14 13:31 devcfei 阅读(143) 评论(0) 推荐(0) 编辑

Linux - SSH

摘要: Overview#apt-get install openssh-server#apt-get install ssh#/etc/init.d/ssh start|stop|restartThe configuration /etc/ssh/sshd_configHow to allow root ... 阅读全文
posted @ 2015-11-14 13:29 devcfei 阅读(123) 评论(0) 推荐(0) 编辑

Open MSDN document directly without Visual Studio

摘要: "C:\Program Files (x86)\Microsoft Help Viewer\v2.2\HlpViewer.exe" /catalogName VisualStudio14"C:\Program Files (x86)\Microsoft Help Viewer\v2.1\HlpVie... 阅读全文
posted @ 2015-11-03 15:48 devcfei 阅读(145) 评论(0) 推荐(0) 编辑

How to map host ip and port to Hyper-V

摘要: 1.1 Add an port proxynetsh interface portproxy add v4tov4 listenport=hostport listenaddres=hostip connectaddress=hypervip connectport=hypervportexampl... 阅读全文
posted @ 2015-08-30 10:48 devcfei 阅读(207) 评论(0) 推荐(0) 编辑

Visual Studio Find All no results.

摘要: 重装WDK什么的有时候有bug。。。。写下面注册表修复Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}] @="PSFacto... 阅读全文
posted @ 2015-07-27 09:26 devcfei 阅读(184) 评论(0) 推荐(0) 编辑

交叉编译lsusb

摘要: [libusb-1.0.8] ./configure CC=arm-linux-gcc --build=i686-linux --host=arm-linux --prefix="$PWD/../usblib-1.0" make install [libusb-compat-0.1.3] export PKG_CONFIG_PATH="$PWD/../usblib-1.0":... 阅读全文
posted @ 2011-08-26 15:41 devcfei 阅读(1517) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示