diff options
Diffstat (limited to 'etc/httpd/conf.d/local_mirror.conf')
-rw-r--r-- | etc/httpd/conf.d/local_mirror.conf | 87 |
1 files changed, 64 insertions, 23 deletions
diff --git a/etc/httpd/conf.d/local_mirror.conf b/etc/httpd/conf.d/local_mirror.conf index 447c57a..1aa0aa1 100644 --- a/etc/httpd/conf.d/local_mirror.conf +++ b/etc/httpd/conf.d/local_mirror.conf @@ -1,31 +1,72 @@ -# File: /etc/httpd/conf.d/local_mirror.conf -# Title: Local Config Additions for Mirror +Listen 192.168.1.11:180 +Listen 192.168.1.11:181 -DirectoryIndex index.html index.htm index.php index.html.var -ServerSignature Off -ServerAdmin linuxadmin@example.com -LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedvhost +# I have the router redirecting ports 80,443 to 180,181 respectively. +# Need these to operate properly +#semanage port -a -t http_port_t -p tcp 180 +#semanage port -a -t http_port_t -p tcp 181 +#firewall-cmd --permanent --add-port=180/tcp --add-port=181/tcp +#firewall-cmd --reload -# Stop the "could not reliably determine the server fqdn" error -ServerName junk.example.com:80 +<VirtualHost 192.168.1.11:180> -# Ignore these files -SetEnvIf Request_URI "ignoredfile.html" dontlog + ServerName albion320.no-ip.biz:80 + ServerAlias albion320.no-ip.biz albion320 + ServerAdmin bgstack15@gmail.com -CustomLog logs/access_log combinedvhost env=!dontlog + DocumentRoot /var/www/html/ -# Deflate output configuration -AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript -BrowserMatch ^Mozilla/4 gzip-only-text/html -BrowserMatch ^Mozilla/4\.0[678] no-gzip -BrowserMatch \bMSIE !no-gzip !gzip-only-text/html + Options +Indexes + IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* + IndexIgnore FOOTER.html repodata favicon.ico favicon.png + ReadmeName FOOTER.html + DirectoryIndex index.php index.html index.htm + ServerSignature Off -# Default in case a name is used for https that we are not providing on https -DocumentRoot "/var/www/html/notfound/" + SetEnvIf Request_URI "ignoredfile.html" dontlog + LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedvhost + CustomLog logs/access_log combinedvhost env=!dontlog -# Turn off HTTP TRACE -TraceEnable off + # Useful additions for a mirror server + AddIcon /icons/rpm.png .rpm + AddIcon /icons/repo.png .repo + AddType application/octet-stream .iso -<FilesMatch "\.acl$"> - Deny from All -</FilesMatch> + AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript + BrowserMatch ^Mozilla/4 gzip-only-text/html + BrowserMatch ^Mozilla/4\.0[678] no-gzip + BrowserMatch \bMSIE !no-gzip !gzip-only-text/html + + TraceEnable off + <FilesMatch "\.acl$"> + Deny from All + </FilesMatch> + + <Directory "/var/www/html/smith122"> + AllowOverride None + Order allow,deny + Allow from all + Options Indexes FollowSymLinks + </Directory> + + # Allows "centos.albion320.no-ip.biz" redirection to "albion320.no-ip.biz/centos" behavior + RewriteEngine On + RewriteCond %{HTTP_HOST} ^([^.]*)\.albion320\.no-ip\.biz$ + RewriteRule /(.*) http://albion320.no-ip.biz/%1/$1 [R,L] + +</VirtualHost> + +<VirtualHost 192.168.1.11:181> + ServerName albion320.no-ip.biz:443 + ServerAlias albion320.no-ip.biz albion320 + + Include conf.d/local_mirror-ssl.cnf + + # Reverse proxy all ssl traffic to the nonencrypted site. This is a template for any and all sites. + # Observe that this depends on /etc/hosts or DNS to look up the variable SERVER_NAME + SSLProxyEngine On + + RewriteEngine On + RewriteRule ^/(.*)$ http://%{SERVER_NAME}/%{REQUEST_URI} [P,L] + +</VirtualHost> |