[root@localhost~] vim /etc/httpd/conf/httpd.conf
# -------- Make the following edits --------
<VirtualHost *:80>
ServerName git.yourdomain.com
DocumentRoot /data/apps/sa_gitlab/gitlab/public
CustomLog logs/git.yourdomain.com combined
ErrorLog logs/git.yourdomain.com-error.log
ProxyPass / http://127.0.0.1:65527/
ProxyPassReverse / http://127.0.0.1:65527/
ProxyPreserveHost On
</VirtualHost>
# -------- Save and close the file --------
[root@localhost~] /etc-init.d/apache2 restarta2enmod # You will be presented with an output similar to: # Your choices are: access_compat actions .... # Which module(s) do you want to enable (wildcards ok)?
proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html
<VirtualHost *:*>
ServerName main.server.com
# ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass /app http://192.168.1.66/app
ProxyPassReverse /app http://192.168.1.66/app
</VirtualHost>systemctl restart apache2
<VirtualHost *:*>
ServerName other.com
# ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ProxyPass /app http://192.168.1.66/app
ProxyPassReverse /app http://192.168.1.66/app
</VirtualHost><html><head><title>other</title> <meta http-equiv="refresh" content="0; url=http://other.com/app"> <body></body></html>
El documento original está disponible en https://clustercien.udea.edu.co/web/tiki-index.php?page=Apache