- CATALOG -
讓 Gitit 使用自己的網域名稱

Apache

<virtualhost>

	ServerName wiki.csie.ncku.edu.tw
	DocumentRoot /var/www/
	RewriteEngine On
	ProxyPreserveHost On
	ProxyRequests Off

	<proxy>
	Order deny,allow
	Allow from all
	</proxy>

	ProxyPassReverse /    http://127.0.0.1:8000
	RewriteRule ^(.*) http://127.0.0.1:8000$1 [P]
	#RewriteLog /var/log/apache2/rewrite.log
	#RewriteLogLevel 9

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

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
	ServerSignature On

</virtualhost>

Nginx

server{
	listen 80; 
	server_name wiki.csie.ncku.edu.tw;
	server_name new.wiki.csie.ncku.edu.tw;

	access_log /var/log/nginx/csiewiki-access.log;

	location / { 
		proxy_redirect off;
		proxy_pass http://localhost:8000;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}   
}

Last modified on 2013-08-08

- CATALOG -