Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I'm running Kubuntu 18.04 LTS with Apache2
- In Apache config there are 3 files
- 1.) /etc/hosts: Here is mine
- 127.0.0.1 localhost
- 127.0.1.1 TBNK-SVR.com
- 127.0.2.1 projects.com
- 127.0.3.1 TBotNik.com/
- 127.0.4.1 Webs-R-Us.com/
- 2.) /etc/apache2/apache2.conf: Here is mine
- # Global configuration
- #
- ServerRoot "/etc/apache2"
- DefaultRuntimeDir ${APACHE_RUN_DIR}
- PidFile ${APACHE_PID_FILE}
- Timeout 300
- KeepAlive On
- MaxKeepAliveRequests 100
- KeepAliveTimeout 5
- User ${APACHE_RUN_USER}
- Group ${APACHE_RUN_GROUP}
- HostnameLookups Off
- ErrorLog ${APACHE_LOG_DIR}/error.log
- LogLevel warn
- IncludeOptional mods-enabled/*.load
- IncludeOptional mods-enabled/*.conf
- Include ports.conf
- <Directory />
- Options FollowSymLinks
- AllowOverride All
- Order deny,allow
- Allow from all
- # Require all granted
- </Directory>
- <Directory /var/www/html>
- Options FollowSymLinks
- AllowOverride All
- Order deny,allow
- Allow from all
- # Require all granted
- </Directory>
- <Directory /usr/share>
- AllowOverride None
- Require all granted
- </Directory>
- <Directory /3T/Syncs/>
- Options Indexes FollowSymLinks
- AllowOverride All
- Require all granted
- </Directory>
- <Directory /3T/Syncs/Projects/>
- Options Indexes FollowSymLinks
- AllowOverride All
- Require all granted
- </Directory>
- <Directory /var/www/>
- Options Indexes FollowSymLinks
- AllowOverride None
- Require all granted
- </Directory>
- AccessFileName .htaccess
- <FilesMatch "^\.ht">
- Require all denied
- </FilesMatch>
- LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
- LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
- LogFormat "%h %l %u %t \"%r\" %>s %O" common
- LogFormat "%{Referer}i -> %U" referer
- LogFormat "%{User-agent}i" agent
- IncludeOptional conf-enabled/*.conf
- IncludeOptional sites-enabled/*.conf
- 3.) /etc/apache2/sites-available/000-default.conf: Here is mine
- <VirtualHost *:80>
- ServerAdmin webmaster@localhost
- DocumentRoot /var/www/
- <Directory /var/www/>
- Options Indexes FollowSymLinks MultiViews
- AllowOverride All
- Order deny,allow
- allow from all
- </Directory>
- ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
- <Directory "/usr/lib/cgi-bin">
- AllowOverride None
- Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
- Order allow,deny
- Allow from all
- </Directory>
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel warn
- ErrorLog ${APACHE_LOG_DIR}/error.log
- CustomLog ${APACHE_LOG_DIR}/access.log combined
- Alias /doc/ "/usr/share/doc/"
- <Directory "/usr/share/doc/">
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- Allow from 127.0.0.0/255.0.0.0 ::1/128
- </Directory>
- <Location />
- Deny from all
- Options None
- ErrorDocument 403 Forbidden.
- </Location>
- </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement