From 811783e0bfb2c5e0be1cfaba586fa13548641e0e Mon Sep 17 00:00:00 2001
From: root <paula.merino.porras@alumnos.uva.es>
Date: Thu, 2 Jun 2022 11:51:31 +0200
Subject: [PATCH] =?UTF-8?q?Archivos=20m=C3=A1quina=2014?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Apache/14/000-default.conf             |  44 +++++++
 Apache/14/certificates/apache-cert.crt |  31 +++++
 Apache/14/certificates/apache.key      |  52 ++++++++
 Apache/14/default-ssl.conf             | 170 +++++++++++++++++++++++++
 4 files changed, 297 insertions(+)
 create mode 100644 Apache/14/000-default.conf
 create mode 100644 Apache/14/certificates/apache-cert.crt
 create mode 100644 Apache/14/certificates/apache.key
 create mode 100644 Apache/14/default-ssl.conf

diff --git a/Apache/14/000-default.conf b/Apache/14/000-default.conf
new file mode 100644
index 0000000..93020a2
--- /dev/null
+++ b/Apache/14/000-default.conf
@@ -0,0 +1,44 @@
+<VirtualHost *:80>
+	# The ServerName directive sets the request scheme, hostname and port that
+	# the server uses to identify itself. This is used when creating
+	# redirection URLs. In the context of virtual hosts, the ServerName
+	# specifies what hostname must appear in the request's Host: header to
+	# match this virtual host. For the default virtual host (this file) this
+	# value is not decisive as it is used as a last resort host regardless.
+	# However, you must set it for any further virtual host explicitly.
+	#ServerName www.example.com
+
+	ServerAdmin webmaster@localhost
+	DocumentRoot /var/www/html
+
+	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
+	# error, crit, alert, emerg.
+	# It is also possible to configure the loglevel for particular
+	# modules, e.g.
+	#LogLevel info ssl:warn
+
+	ErrorLog ${APACHE_LOG_DIR}/error.log
+	CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+	# For most configuration files from conf-available/, which are
+	# enabled or disabled at a global level, it is possible to
+	# include a line for only one particular virtual host. For example the
+	# following line enables the CGI configuration for this host only
+	# after it has been globally disabled with "a2disconf".
+	#Include conf-available/serve-cgi-bin.conf
+
+
+# ************************* TFG ****************************
+
+        RewriteEngine On
+        RewriteCond %{HTTPS} off
+        RewriteRule ^(.*)$ https://192.168.2.14:443/$1 [L,R=301]
+
+
+
+# **********************************************************
+
+
+</VirtualHost>
+
+# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
diff --git a/Apache/14/certificates/apache-cert.crt b/Apache/14/certificates/apache-cert.crt
new file mode 100644
index 0000000..1388f0e
--- /dev/null
+++ b/Apache/14/certificates/apache-cert.crt
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgIUU6uMw6xZmxWWQGMwKpUiV+6KlMswDQYJKoZIhvcNAQEL
+BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
+GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMjA1MTgxMzQ0MjFaFw0yMzA1
+MTgxMzQ0MjFaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
+HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQDEaEkSdA0cOTL662XR9N2WbIVIsTt7IioTf2nQEFIr
+Jow8UmXuYuRb9hIGtn91PDVCIQyZ6FE+R7lyfHBsjgG75fyj9HShYgeixN3q5gkt
+LvMKM2+AVylgJh71S2KyHqkMw2CbZw26R3SLa5UqPXIrQ0DTx63hZjDWIALg+Z8F
+Jn857UzV/tD2TRpRD0mOVtnNAnpDItPxtoDOn/N4gnt59HEJ64NOTHgF9eIRPNFE
+b9BY+ZKVnj2gJlzYxq0yfLF9k32raEAXHTcneXBxy8sVHXUhib0pE+vCXRmdfdFK
+obf6Lw1R0lZbcL7TcoYFzkHc6vD2f5CDDzgyGdd1yfR2EEAfJrUPRI40nG+sYOul
+5J4StQ9SSiAw3VwRXRQv3/vAJT8xTvLMsUU141KCW43EATTWyORUK34UEuJ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ew6BZrtVR4IHVYLDURceFQJC15CVBtBNnBjW4fmolwZVW8HCHMwRb89DyFmw=
+-----END CERTIFICATE-----
diff --git a/Apache/14/certificates/apache.key b/Apache/14/certificates/apache.key
new file mode 100644
index 0000000..c6f2476
--- /dev/null
+++ b/Apache/14/certificates/apache.key
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDEaEkSdA0cOTL6
+62XR9N2WbIVIsTt7IioTf2nQEFIrJow8UmXuYuRb9hIGtn91PDVCIQyZ6FE+R7ly
+fHBsjgG75fyj9HShYgeixN3q5gktLvMKM2+AVylgJh71S2KyHqkMw2CbZw26R3SL
+a5UqPXIrQ0DTx63hZjDWIALg+Z8FJn857UzV/tD2TRpRD0mOVtnNAnpDItPxtoDO
+n/N4gnt59HEJ64NOTHgF9eIRPNFEb9BY+ZKVnj2gJlzYxq0yfLF9k32raEAXHTcn
+eXBxy8sVHXUhib0pE+vCXRmdfdFKobf6Lw1R0lZbcL7TcoYFzkHc6vD2f5CDDzgy
+Gdd1yfR2EEAfJrUPRI40nG+sYOul5J4StQ9SSiAw3VwRXRQv3/vAJT8xTvLMsUU1
+41KCW43EATTWyORUK34UEuJRgvX/atkjCTDYLZUHQkce/V1nyR38gZb2seOxZI5z
+9x3o4HF1EVhDnXDHWbGNbDeJD9xwB6/s+/E1L9zI3wBhReL9sjbQH/rEY5sf3kBg
+sJaHJQ0yoVR81j0jN8sxVL3mrek2T0doLWsWwhi0VM8gYWpS9gz48XE0biDbfVc3
+Aj7AhjOP6B2I0kSUGhzVLfB/z6HW6dna5Mcs9tWI/E4OFq+TSSNQCCJDZR6GNmwz
+SdtBqQB5HqXndUxF9KKDttA3kV7WVQIDAQABAoICAQCLHN5c3qwGiJEOXrrwukJU
+8Cp7cWUS8wDgbIey4kyA2b3MYARok8zxQdpEvPCMRgfm/eeh/4XD2iOE7pTmnrKl
+tuF584TEZd3IsS4J2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nZiO4cFnlwKg
+mx1D05CXWIW3y32+0hKg5UfGZgOxc6luRM1jjcI+JBVg6X8Z7pL3cic6Cc9s05Ij
+RJZV1cCYN+6Tjz1+kdHAsD44AfXy1ARdwfucjngAxKo26pErsgOMlv2j1meDU/P7
+2s5s++7TIaoxRvKJtyBabqiIH7QczXofsbm7lUYXZDY7SL3aLYfm4RxX0DeLN6q+
+IVPHunbVZSZ95C+8w/wbgG0MNA11WQ==
+-----END PRIVATE KEY-----
diff --git a/Apache/14/default-ssl.conf b/Apache/14/default-ssl.conf
new file mode 100644
index 0000000..7d7dafb
--- /dev/null
+++ b/Apache/14/default-ssl.conf
@@ -0,0 +1,170 @@
+<IfModule mod_ssl.c>
+	<VirtualHost _default_:443>
+		ServerAdmin webmaster@localhost
+
+		DocumentRoot /var/www/html
+
+		# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
+		# error, crit, alert, emerg.
+		# It is also possible to configure the loglevel for particular
+		# modules, e.g.
+		#LogLevel info ssl:warn
+
+		ErrorLog ${APACHE_LOG_DIR}/error.log
+		CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+		# For most configuration files from conf-available/, which are
+		# enabled or disabled at a global level, it is possible to
+		# include a line for only one particular virtual host. For example the
+		# following line enables the CGI configuration for this host only
+		# after it has been globally disabled with "a2disconf".
+		#Include conf-available/serve-cgi-bin.conf
+
+		#   SSL Engine Switch:
+		#   Enable/Disable SSL for this virtual host.
+		SSLEngine on
+
+		#   A self-signed (snakeoil) certificate can be created by installing
+		#   the ssl-cert package. See
+		#   /usr/share/doc/apache2/README.Debian.gz for more info.
+		#   If both key and certificate are stored in the same file, only the
+		#   SSLCertificateFile directive is needed.
+		SSLCertificateFile      /etc/apache2/certificates/apache-cert.crt
+		SSLCertificateKeyFile   /etc/apache2/certificates/apache.key
+
+		#   Server Certificate Chain:
+		#   Point SSLCertificateChainFile at a file containing the
+		#   concatenation of PEM encoded CA certificates which form the
+		#   certificate chain for the server certificate. Alternatively
+		#   the referenced file can be the same as SSLCertificateFile
+		#   when the CA certificates are directly appended to the server
+		#   certificate for convinience.
+		#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
+
+		#   Certificate Authority (CA):
+		#   Set the CA certificate verification path where to find CA
+		#   certificates for client authentication or alternatively one
+		#   huge file containing all of them (file must be PEM encoded)
+		#   Note: Inside SSLCACertificatePath you need hash symlinks
+		#		 to point to the certificate files. Use the provided
+		#		 Makefile to update the hash symlinks after changes.
+		#SSLCACertificatePath /etc/ssl/certs/
+		#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
+
+		#   Certificate Revocation Lists (CRL):
+		#   Set the CA revocation path where to find CA CRLs for client
+		#   authentication or alternatively one huge file containing all
+		#   of them (file must be PEM encoded)
+		#   Note: Inside SSLCARevocationPath you need hash symlinks
+		#		 to point to the certificate files. Use the provided
+		#		 Makefile to update the hash symlinks after changes.
+		#SSLCARevocationPath /etc/apache2/ssl.crl/
+		#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
+
+		#   Client Authentication (Type):
+		#   Client certificate verification type and depth.  Types are
+		#   none, optional, require and optional_no_ca.  Depth is a
+		#   number which specifies how deeply to verify the certificate
+		#   issuer chain before deciding the certificate is not valid.
+		#SSLVerifyClient require
+		#SSLVerifyDepth  10
+
+		#   SSL Engine Options:
+		#   Set various options for the SSL engine.
+		#   o FakeBasicAuth:
+		#	 Translate the client X.509 into a Basic Authorisation.  This means that
+		#	 the standard Auth/DBMAuth methods can be used for access control.  The
+		#	 user name is the `one line' version of the client's X.509 certificate.
+		#	 Note that no password is obtained from the user. Every entry in the user
+		#	 file needs this password: `xxj31ZMTZzkVA'.
+		#   o ExportCertData:
+		#	 This exports two additional environment variables: SSL_CLIENT_CERT and
+		#	 SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
+		#	 server (always existing) and the client (only existing when client
+		#	 authentication is used). This can be used to import the certificates
+		#	 into CGI scripts.
+		#   o StdEnvVars:
+		#	 This exports the standard SSL/TLS related `SSL_*' environment variables.
+		#	 Per default this exportation is switched off for performance reasons,
+		#	 because the extraction step is an expensive operation and is usually
+		#	 useless for serving static content. So one usually enables the
+		#	 exportation for CGI and SSI requests only.
+		#   o OptRenegotiate:
+		#	 This enables optimized SSL connection renegotiation handling when SSL
+		#	 directives are used in per-directory context.
+		#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
+		<FilesMatch "\.(cgi|shtml|phtml|php)$">
+				SSLOptions +StdEnvVars
+		</FilesMatch>
+		<Directory /usr/lib/cgi-bin>
+				SSLOptions +StdEnvVars
+		</Directory>
+
+		#   SSL Protocol Adjustments:
+		#   The safe and default but still SSL/TLS standard compliant shutdown
+		#   approach is that mod_ssl sends the close notify alert but doesn't wait for
+		#   the close notify alert from client. When you need a different shutdown
+		#   approach you can use one of the following variables:
+		#   o ssl-unclean-shutdown:
+		#	 This forces an unclean shutdown when the connection is closed, i.e. no
+		#	 SSL close notify alert is send or allowed to received.  This violates
+		#	 the SSL/TLS standard but is needed for some brain-dead browsers. Use
+		#	 this when you receive I/O errors because of the standard approach where
+		#	 mod_ssl sends the close notify alert.
+		#   o ssl-accurate-shutdown:
+		#	 This forces an accurate shutdown when the connection is closed, i.e. a
+		#	 SSL close notify alert is send and mod_ssl waits for the close notify
+		#	 alert of the client. This is 100% SSL/TLS standard compliant, but in
+		#	 practice often causes hanging connections with brain-dead browsers. Use
+		#	 this only for browsers where you know that their SSL implementation
+		#	 works correctly.
+		#   Notice: Most problems of broken clients are also related to the HTTP
+		#   keep-alive facility, so you usually additionally want to disable
+		#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
+		#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
+		#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
+		#   "force-response-1.0" for this.
+		# BrowserMatch "MSIE [2-6]" \
+		#		nokeepalive ssl-unclean-shutdown \
+		#		downgrade-1.0 force-response-1.0
+
+
+# ********************************* TFG - SOLUCION 1 **************************************
+#		SSLProxyEngine On
+#                SSLProxyVerify none
+#                SSLProxyCheckPeerCN off
+#                SSLProxyCheckPeerExpire off
+
+
+ #               <Location /KTRhg_yaxFhjGXYNAWP4iwOxsNqPIoApEWI>
+ #                       RewriteEngine on
+ #                       RewriteCond %{HTTP_USER_AGENT} "=Mozilla/5.0 (Macintosh; Intel Mac OS X 12_2_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15"
+ #                       RewriteRule ^(.*)$ "https://192.168.1.40:443/%{REQUEST_URI}" [L,P]
+ #               </Location>
+
+# ***************************************************************************************
+
+# ********************************** TFG SOLUCION 2 **************************************
+		SSLProxyEngine On
+                SSLProxyVerify none
+                SSLProxyCheckPeerCN off
+                SSLProxyCheckPeerExpire off
+
+
+                <Location /KTRhg_yaxFhjGXYNAWP4iwOxsNqPIoApEWI>
+                        RewriteEngine on
+                        RewriteCond %{REMOTE_ADDR} 192.168.2.11
+			RewriteCond %{HTTP_USER_AGENT} "=Mozilla/5.0 (Macintosh; Intel Mac OS X 12_2_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15"
+                        RewriteRule ^(.*)$ "https://192.168.1.40:443/%{REQUEST_URI}" [L,P]
+
+                        RewriteCond %{REMOTE_ADDR} !192.168.2.11
+                        RewriteCond %{HTTP_USER_AGENT} "=Mozilla/5.0 (Macintosh; Intel Mac OS X 12_2_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15"
+			RewriteRule ^(.*)$ "https://192.168.2.12:443/%{REQUEST_URI}" [L,P]
+                </Location>
+
+# ***************************************************************************************
+
+	</VirtualHost>
+</IfModule>
+
+# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
-- 
GitLab