Skip to content

Commit 260097a

Browse files
committed
Update httpd-vhosts.conf
1 parent 090de39 commit 260097a

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

webserver/extra/httpd-vhosts.conf

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,48 @@
2121
# match a ServerName or ServerAlias in any <VirtualHost> block.
2222
#
2323

24+
Listen 90
25+
2426
ServerName localhost
2527

2628
LoadModule rewrite_module /usr/local/apache2/modules/mod_rewrite.so
2729
LoadModule deflate_module /usr/local/apache2/modules/mod_deflate.so
30+
LoadModule slotmem_shm_module /usr/local/apache2/modules/mod_slotmem_shm.so
2831
LoadModule proxy_module /usr/local/apache2/modules/mod_proxy.so
2932
LoadModule proxy_fcgi_module /usr/local/apache2/modules/mod_proxy_fcgi.so
33+
LoadModule proxy_balancer_module /usr/local/apache2/modules/mod_proxy_balancer.so
34+
LoadModule proxy_http_module /usr/local/apache2/modules/mod_proxy_http.so
35+
LoadModule proxy_http2_module /usr/local/apache2/modules/mod_proxy_http2.so
36+
LoadModule socache_shmcb_module /usr/local/apache2/modules/mod_socache_shmcb.so
37+
38+
<VirtualHost _default_:80>
39+
40+
# General setup for the virtual host
41+
ServerName example.com
42+
ServerAlias www.example.com
43+
ServerAdmin admin@example.com
44+
45+
RequestHeader set X-Forwarded-Proto "https"
46+
47+
ErrorLog "/usr/local/apache2/logs/example.com-8080.error_log"
48+
TransferLog "/usr/local/apache2/logs/access_log"
49+
50+
# Use incoming Host HTTP request header for proxy request
51+
ProxyPreserveHost On
52+
ProxyPass / http://varnish:8080/
53+
ProxyPassReverse / http://varnish:8080/
54+
55+
</VirtualHost>
3056

31-
<VirtualHost *:8080>
57+
<VirtualHost *:90>
3258

3359
# General setup for the virtual host
3460
DocumentRoot "/var/www/html"
3561
ServerName example.com
3662
ServerAlias www.example.com
3763
ServerAdmin admin@example.com
3864

39-
ErrorLog "/usr/local/apache2/logs/example.com.error_log"
65+
ErrorLog "/usr/local/apache2/logs/example.com-90.error_log"
4066
TransferLog "/usr/local/apache2/logs/access_log"
4167

4268
# Protocols h2 http/1.1

0 commit comments

Comments
 (0)