Nginx Reverse Proxy Config


server {
	listen 80;
	server_name template.st-denis.info;

	location ^~ /.well-known/acme-challenge {
		alias /usr/share/nginx/html/dehydrated;
	}

	location / {
		return 302 https://$host$request_uri;
	}
}
	
server {
	listen 443 ssl;
	server_name template.st-denis.info;
	
	location / {
		access_log off;
		proxy_pass http://192.168.2.113:80;
		proxy_set_header X-Real-IP $remote_addr;
		#proxy_set_header Host $host;
		proxy_set_header Host template.st-denis.info;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}
	
	ssl_certificate /etc/dehydrated/certs/template.st-denis.info/fullchain.pem;
	ssl_certificate_key /etc/dehydrated/certs/template.st-denis.info/privkey.pem;
	ssl_session_cache shared:le_nginx_SSL:10m;
	ssl_session_timeout 1440m;
	ssl_protocols TLSv1.2;
	ssl_prefer_server_ciphers off;
	ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
	
}
	


Apache VirtualHost Config Example


<VirtualHost 192.168.2.113:80>
ServerName template.st-denis.info
#ServerAlias www.st-denis.info
ServerAdmin webmaster@st-denis.info
DocumentRoot /var/www/vhosts/template/public
ErrorDocument 404 http://st-denis.info/
LogFormat "%a %l %u %t \"%r\" %s %b \"%{referrer}i\" \"%{User-agent}i\"" mycustom
ErrorLog /var/log/httpd/template-error_log
CustomLog /var/log/httpd/template-access_log mycustom
SuExecUserGroup andrew andrew
<Directory /var/www/vhosts/template/public>
	AllowOverride All
	Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
	<Limit GET POST OPTIONS PROPFIND>
		Order allow,deny
		Allow from all
	</Limit>
</Directory>
SetEnv PHP_ADMIN_VALUE "sendmail_path = '/usr/sbin/sendmail -t -i -F \"No Reply\" -f noreply@st-denis.info'"
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 192.168.2.0/24
</VirtualHost>
	
Top