/etc/apache2/sites-available/000-default.conf

(/etc/apache2/sites-enabled/000-default.conf에서 넘어옴)

1 개요[ | ]

/etc/apache2/sites-available/000-default.conf
/etc/apache2/sites-enabled/000-default.conf
root@zetawiki:~# ll /etc/apache2/sites-enabled/000-default.conf
lrwxrwxrwx 1 root root 35 Sep 21 01:15 /etc/apache2/sites-enabled/000-default.conf -> ../sites-available/000-default.conf

2 내용[ | ]

cat /etc/apache2/sites-enabled/000-default.conf | egrep -v ^[[:space:]]*(#.*)?$
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
cat /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

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

3 예시[ | ]

    <Directory /var/www/blog/public/>
      Options Indexes FollowSymLinks
      #AllowOverride None
      AllowOverride All
      Require all granted
    
      ## wiki preprocessing
      RewriteEngine On
      
      ## Redirect Trailing Slashes...
      RewriteRule ^(.*)/$ /$1 [L,R=301]
    
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]
      RewriteRule ^wiki/*$ /w/index.php [L,QSA]
      RewriteRule ^wiki$ /w/index.php [L,QSA]
    
      ## Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
    
      ## Handle Authorization Header
      #RewriteCond %{HTTP:Authorization} .
      #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    </Directory>
    <VirtualHost *:80>
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/blog/public
      Alias /w /var/www/html/
    
      #LogLevel debug
      #ErrorLog ${APACHE_LOG_DIR}/error.log
      #CustomLog ${APACHE_LOG_DIR}/access.log combined
      ErrorLog /tmp/error.log
      CustomLog /tmp/access.log combined
    </VirtualHost>

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}