summaryrefslogtreecommitdiff
path: root/etc/httpd/conf.d/local_mirror.conf
blob: 775436e89b67191c47d824eec9315268e3070afd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Listen 192.168.1.14:180
Listen 192.168.1.14:181

# 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

<VirtualHost 192.168.1.14:180>

	ServerName	albion320.no-ip.biz:80
	ServerAlias	albion320.no-ip.biz albion320 storage1 storage1.ipa.smith122.com
	ServerAdmin	bgstack15@gmail.com

	DocumentRoot	/var/www

	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

	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

	# Useful additions for a mirror server
	AddIcon /icons/rpm.png          .rpm
	AddIcon /icons/deb.png          .deb
	AddIcon /icons/repo.png         .repo
	AddType application/octet-stream .iso

	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/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.14:181>
	ServerName	albion320.no-ip.biz:443
	ServerAlias	albion320.no-ip.biz albion320 storage1 storage1.ipa.smith122.com

	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>
bgstack15