Jump to content



Photo

How to ReverseProxy with HTTPS?


  • Please log in to reply
No replies to this topic

#1 kende;

kende;

    Resident One Post Wonder

  • Joined: 02-March 13

Posted 02 March 2013 - 15:10

Initially I had a standard Virtual Host with proxy forward that worked perfect. I have a webserver and another server hosting soemthing else (Lets call it Fileserver)

Webserver Virtual host:
<VirtualHost *:80>
ServerName hostname.example.com
ServerAlias hostname.example.com
ProxyPreserveHost On
ProxyPass / http://192.168.10.150/
ProxyPassReverse / http://192.168.10.150/
</VirtualHost>

FileServer Virtual Host:
<VirtualHost *:80>
ServerName hostname.example.com
ServerAlias hostname.example.com
DocumentRoot /www/example2

</VirtualHost>

Now that worked fine for a while, but then I added another server for a testing a control panel. The server works fien if you use your browser to goto https://192.168.10.180:8080 it brings up the panel... and I checked the virtual host for that server and this is what is there:
ServerAdmin webmaster@localhost
  
  <FilesMatch "\.ph(p3?|tml)$">
	SetHandler None
  </FilesMatch>
  
  <IfModule mod_fcgid.c>
	DocumentRoot /var/www/ispconfig/
	SuexecUserGroup ispconfig ispconfig
	<Directory /var/www/ispconfig/>
	  Options Indexes FollowSymLinks MultiViews +ExecCGI
	  AllowOverride AuthConfig Indexes Limit Options FileInfo
	  AddHandler fcgid-script .php
	  FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
	  Order allow,deny
	  Allow from all
	</Directory>
	IPCCommTimeout  7200
  </IfModule>
  
#  <IfModule mod_php5.c>
#	DocumentRoot /usr/local/ispconfig/interface/web/
#	AddType application/x-httpd-php .php
#	<Directory /usr/local/ispconfig/interface/web>
#	  # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
#	  Options FollowSymLinks
#	  AllowOverride None
#	  Order allow,deny
#	  Allow from all
#	  php_value magic_quotes_gpc		0
#	</Directory>
#  </IfModule>
  
  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off
  
  <IfModule mod_security2.c>
	SecRuleEngine Off
  </IfModule>

  # SSL Configuration
  SSLEngine On
  SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
  SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
  #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
Now I made a Proxy attempt to reach it by adding a new record to my dns called cp.example.com but it just does not work, how can I fix it? Here is what I tried:
<VirtualHost *:80>
ServerName cp.example.com

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / https://192.168.10.150:8080/
ProxyPassReverse / https://192.168.10.150:8080/
</VirtualHost>




Click here to login or here to register to remove this ad, it's free!