Apache проксирование на другой порт

Пример конфига с проксированием bit.lan.ssl.conf:

 

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin your_email@example.com
ServerName bit.lan

DocumentRoot /var/www/html

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

SSLEngine on

SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key

ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8800/
ProxyPassReverse / http://127.0.0.1:8800/

<FilesMatch “\.(cgi|shtml|phtml|php)$”>
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>

</VirtualHost>
</IfModule>

 

 

 

 

sudo a2ensite default-ssl (имя нужного конфига)

a2enmod proxy_html
a2enmod proxy_http

systemctl restart apache2

Scroll to top