Hi guys,
i finally finished my serverbuild and now it runs owncloud and a minecraftserver.
The minecraftserver(-webinterface) is on https://stuff:8080 and the owncloud is on https://stuff/owncloud.
I read about a apache proxy to pipe the https://stuff:8080 to https://stuff/mineOS and now i am trying to figure the conffiles out but after one day i didn’t get closer to my goal.
Could one of you help me with the conf files? I searched the web but can’t find a good or understandable example.
Thank you in advance
Felix
I think you could try something like this. For it to work you have to install and enable modrewrite.
<VirtualHost *:443>
ServerName your.domain
DocumentRoot /www/mineos
RewriteEngine on
RewriteRule ^/,* https:stuff:8080/$1
</VirtualHost>
I haven't tried that so I'm not really 100% but I think it would be something like that.
I'll show you my conf file for my owncloud proxy as an example which might help.
<VirtualHost *:80>
ServerName owncloud.domain.com
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName owncloud.domain.com
SSLEngine On
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/ssl/certs/owncloud.crt
SSLCertificateKeyFile /etc/ssl/private/owncloud.key
SSLCertificateChainFile /etc/ssl/certs/CA.crt
RewriteEngine on
RewriteRule ^/(.*)$ http://10.1.3.32/$1 [P,L]
</VirtualHost>
On the owncloud server I don't use SSL and have the proxy do that instead, so the first section is redirecting HTTP to HTTPS and the second section is redirecting to the owncloud server and configuring the SSL stuff.
Thank you for your help dexter, but i think i said the wrong. Now it seems like https://something/whatever is redirected to https://something:8080. I wanted to do something to let the mineos webgui be reachable under https://something/mineos with the port 443 and not the default 8080.
I will try to find the conffile for this but i couldn't yet so i wanted to trie this with a proxy.
If that redirected properly but SSL isn't working then try this
<VirtualHost *:80>
ServerName your.domain
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName your.domain
DocumentRoot /www/mineos
SSLEngine on
SSLCertificateFile /path/to/.crt
SSLCertificateKeyFile /path/to/.key
RewriteEngine on
RewriteRule ^/(.*)$ http://stuff:8080/$1 [P,L]
</VirtualHost>
for the rewrite rule use the IP address of the server, so if this is running on the same server then use http://127.0.0.1:8080 You don't need to open port 8080 to the internet just 80 and 443.
Thank you Dexer,
but i didn't get it figured out. This project is on sleep now because it's not that essencial for the server. It would be nice, but first off all i need to set up the Backups and the Storage.
greetings
Felix