Debian 8 Apache2

Source: Internet
Author: User
Tags ssh port

First, the directory structure:

/etc/apache2/

|--apache2.conf//Global configuration file

|--conf-available//config file

|--conf-enabled//Activated configuration file

|--Envvars

|--Magic

|--mods-available

|--mods-enabled

|--ports.conf

|--sites-available

'--sites-enabled

Two or three command a2enconf, A2enmod, A2ensite

The function is to connect the things in the available to the enabled

Third, create site ' sites-available/001-gzyinkaixuan.conf '

<virtualhost *:8080>

#ServerName www.example.com

ServerName localhost Specify your server name


#ServerAdmin [email protected]

Documentroot/home/www/site/pelican Specify the file location of your Web site


<directory "/home/www/site/pelican" >

Options FollowSymLinks

AllowOverride None

Require all granted

</Directory>


Errorlog "|/usr/bin/rotatelogs/home/www/log/error.log.%y-%m-%d-%h:%m:%s 5M"

Customlog "|/usr/bin/rotatelogs/home/www/log/access.log 3600" combined

</VirtualHost>

Iv. use A2ensite 001-gzyinkaixuan.conf to activate your site and then access

http://<yourip>:8080, please note that firewall ports are open

V. Additional

Default Firewall Policy:

*filter:input Accept [0:0]:forward Accept [0:0]:output Accept [0:0]# for established connections-i input-m State--state Established,related-j accept-a input-s 127.0.0.1/32-j accept-a input-s ${myip}-j accept-a input-p icmp-j ACCEPT# fo R ssh-a input-p tcp--dport <your ssh port>-j localnet# drop all-i input-j dropcommit


Debian 8 Apache2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.