Author |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Sat 02 May '20 14:42 Post subject: Use Apache to access my other server |
|
|
Hello,
I have a nas server, and I would have liked to be able to access its web interface on an address like https://nas.mydomain.fr
I'm using a let's encrypt certificate for mydomain.fr.
But I don't know how to redirect requests from the "nas" sub-domain and above all, how to apply the certificate to it.
Knowing that the nas is a synology.
Could you help me set this up?
Thank you |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 02 May '20 17:20 Post subject: |
|
|
The key word is reverse proxy
Code: |
<VirtualHost *:443>
ServerName nas.mydomain.fr
DocumentRoot /c/www
<Directory /c/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ProxyPass / http://192.168.0.10/
ProxyPassReverse / http://192.168.0.10/
SSLEngine on
SSLCertificateFile /c/etc/letsencrypt/live/nas.mydomain.fr/fullchain.pem
SSLCertificateKeyFile /c/etc/letsencrypt/live/nas.mydomain.fr/privkey.pem
</VirtualHost>
|
Note that /c/www (C:\www\) can be empty, but it must exist. |
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Sat 02 May '20 18:50 Post subject: |
|
|
Oh !
Maybe that's my mistake !
I never set a documentroot when i try to set reverseproxy.
I'll take a look as soon as possible ! |
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Sat 02 May '20 19:50 Post subject: |
|
|
Ok, i have an error, but i don't know where...
Here is my config :
Code: | <VirtualHost *:443>
ServerName nas.mydomain.biz
DocumentRoot e:/www/mydomain/html/nas/
<Directory e:/www/mydomain/html/nas/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ProxyPass / http://172.16.0.250:5180/
ProxyPassReverse / http://172.16.0.250:5180/
SSLEngine on
SSLCertificateFile C:/Certificats/POSH-acme/fullchain.cer
SSLCertificateKeyFile C:/Certificats/POSH-acme/cert.key
SSLCertificateChainFile C:/Certificats/POSH-acme/chain.cer
</VirtualHost> |
And it lead me to an error 500.
Is there anything else that "LoadModule proxy_module modules/mod_proxy.so" needed ? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
bagu
Joined: 06 Jan 2011 Posts: 193 Location: France
|
Posted: Sat 02 May '20 23:45 Post subject: |
|
|
Argh ! That's it.
Thanks a lot, it work fine now. |
|
Back to top |
|