apache2 下载服务器配置

apache2 下载服务器配置

  • 新建配置文件:
sudo vi /etc/apache2/sites-available/001-download.conf

内容:

<VirtualHost *:3002>
ServerName 127.0.0.1
ServerAdmin webmaster@localhost
#这两个配置必须一致
DocumentRoot /home/android/weibiao/downloadVersion/download
#这两个配置必须一致DocumentRoot 和 Directory
<Directory /home/android/weibiao/downloadVersion/download>
Options Indexes FollowSymLinks
AllowOverride none
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error_download.log
CustomLog ${APACHE_LOG_DIR}/access_download.log combined
</VirtualHost>

<VirtualHost *:3002>
ServerName 127.0.0.1
ServerAdmin webmaster@localhost
DocumentRoot /home/android/weibiao/downloadVersion/download
<Directory /home/android/weibiao/downloadVersion/download>
Options Indexes FollowSymLinks
AllowOverride none
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error_download.log
CustomLog ${APACHE_LOG_DIR}/access_download.log combined
</VirtualHost>

修改 /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80
#新增的端口
Listen 3002
<IfModule ssl_module>
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

  • 在/etc/apache2/sites-enabled目录下面创建软链接

    sudo ln -s  ../sites-available/001-download.conf  001-download.conf
  • 重启服务器:

    sudo service apache2 restart

上一篇
binder 信息 binder 信息
大体信息:/sys/kernel/debug/binder/transactions 每个进程的单个信息:/sys/kernel/debug/binder/proc
2018-12-07 彪彪
下一篇
GDB调试手机工程 GDB调试手机工程
GDB调试手机工程挂载自己编译好的工程 以我自己在10.1.6.32编译的工程为例. sudo mount -t cifs -o username="android",password="mobile#5&qu
2018-12-07 彪彪