ServerName logicmoo.org #Header always set X-Frame-Options "*" RewriteEngine On ProxyPreserveHost On AllowOverride All Options +Indexes #+FollowSymLinks IndexOptions +FancyIndexing # Options SymLinksIfOwnerMatch Order allow,deny Allow from all Include /etc/apache2/conf-available/cliopatria_swish.conf Include /etc/apache2/conf-available/no_open_proxy.conf Include /etc/apache2/conf-available/doc_root.conf RewriteEngine On RewriteCond %{REQUEST_URI} ^/$ RewriteCond %{REQUEST_URI} !^/public/(.*) RewriteRule ^$ https://logicmoo.org/public/ [L] Listen 2082 ServerName logicmoo.org ServerSignature Off #ProxyPreserveHost On # Ensure that encoded slashes are not decoded but left in their encoded state. # http://doc.gitlab.com/ce/api/projects.html#get-single-project AllowEncodedSlashes NoDecode #RedirectMatch 301 ^/gitlab(.*)$ https://logicmoo.org:2082/gitlab$1 # New authorization commands for apache 2.4 and up # http://httpd.apache.org/docs/2.4/upgrading.html#access Require all granted #Allow forwarding to gitlab-workhorse ProxyPassReverse http://127.0.0.1:1082 ProxyPassReverse http://logicmoo.org/ #Forward all requests to gitlab-workhorse except existing files like error documents RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_URI} ^.*/uploads/.* RewriteRule .* http://127.0.0.1:1082%{REQUEST_URI} [P,QSA,NE] #RedirectMatch 301 ^/gitlab(.*)$ https://logicmoo.org:2082/gitlab$1 RedirectMatch 301 ^/jenkins(.*)$ https://jenkins.logicmoo.org/jenkins$1 # Apache equivalent of nginx try files # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab RewriteEngine on # needed for downloading attachments #DocumentRoot /home/git/gitlab/public #Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up. #ErrorDocument 404 /404.html #ErrorDocument 422 /422.html #ErrorDocument 500 /500.html #ErrorDocument 502 /502.html # ErrorDocument 503 /503.html # It is assumed that the log directory is in /var/log/httpd. # For Debian distributions you might want to change this to # /var/log/apache2. ErrorLog /tmp/apache_err.log #${APACHE_LOG_DIR}/error.log CustomLog /tmp/apache.log combined Include /etc/apache2/conf-available/doc_root_ssl.conf