linuxserver.io

[Support] Linuxserver.io - Apache

Recommended Posts

linuxserver_medium.png

 

Application Name: Apache

Application Site: https://httpd.apache.org/

Docker Hub: https://hub.docker.com/r/linuxserver/apache/

Github: https://github.com/linuxserver/docker-apache

 

Please post any questions/issues relating to this docker you have in this thread.

 

If you are not using Unraid (and you should be!) then please do not post here, rather use the linuxserver.io forum for support.

Share this post


Link to post
Share on other sites

Hi guys.  I'm trying to configure a reverse-proxy.  There are a bunch of threads on the subject but the containers that they mention are all deprecated or in limbo (are you guys doing a Nginx or not?)

 

Anyway, I figured I'd go the apache way and use this container.

 

I started playing with this about a week ago, big thanks to the primers here:

 

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/add-ssl-to-your-apache-reverseproxy-docker/

 

If I can suggest an improvement for the SSL overview above, this thread

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

brought me up to a much more secure config.  You should add smdion's apache SSL config parameters from that thread to your overview, it's great info for the security settings and the SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile parameters

 

I got Deluge working through reverse proxy, I need to figure out plexrequest next but it looks like I'll need another certificate.  "Let's encrypt" is going open beta today, I'll try to play with that.

 

Share this post


Link to post
Share on other sites

Hi guys.  I'm trying to configure a reverse-proxy.  There are a bunch of threads on the subject but the containers that they mention are all deprecated or in limbo (are you guys doing a Nginx or not?)

 

Anyway, I figured I'd go the apache way and use this container.

 

I started playing with this about a week ago, big thanks to the primers here:

 

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/add-ssl-to-your-apache-reverseproxy-docker/

 

If I can suggest an improvement for the SSL overview above, this thread

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

brought me up to a much more secure config.  You should add smdion's apache SSL config parameters from that thread to your overview, it's great info for the security settings and the SSLCertificateFile, SSLCertificateKeyFile and SSLCertificateChainFile parameters

 

I got Deluge working through reverse proxy, I need to figure out plexrequest next but it looks like I'll need another certificate.  "Let's encrypt" is going open beta today, I'll try to play with that.

 

Hey Gog,

 

I'll add that to the writeup.  Everything else make sense for you in there?

Share this post


Link to post
Share on other sites
I got Deluge working through reverse proxy,
Could you elaborate? When I tried, I couldn't figure out how to get the baseurl to cooperate. Did you use rewrites?

Share this post


Link to post
Share on other sites

I'm very new to Apache (all things web, really) so I had to dig around a bit but these two pages were my foundation.

 

You have a dead link in "Installing the Docker on other systems".

 

I was put on hold for validation of my SSL certificate so it deviated from your instructions a bit.  It got me scrambling because you don't always refer to some document with the same name.  Simple things like the private key is ssl.key (BTW, can you have two certificate use the same key?)

 

And how to point Apache to the different SSL files is also not in there.  Google fixed that quickly and it's also in your default.conf from the security check thread.

 

Oh and it took me an embarrassing long time to understand what .htaccess does.  10M hits on google but I had to dig around to find out that it's a password popup...

 

 

Share this post


Link to post
Share on other sites

I got Deluge working through reverse proxy,
Could you elaborate? When I tried, I couldn't figure out how to get the baseurl to cooperate. Did you use rewrites?

 

We have a config for Deluge in here jonathanm

 

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

 

 

Scroll towards the bottom.

Share this post


Link to post
Share on other sites

You have a dead link in "Installing the Docker on other systems".

Which document is this on?

 

 

I was put on hold for validation of my SSL certificate so it deviated from your instructions a bit.  It got me scrambling because you don't always refer to some document with the same name.  Simple things like the private key is ssl.key (BTW, can you have two certificate use the same key?)

Sorry for the continuity issues, I copied and pasted a lot from my personal blog to the linuxserver.io blog and the naming changed. I will go thru it again and update.

 

Why are you signing up for two certs?

 

And how to point Apache to the different SSL files is also not in there.  Google fixed that quickly and it's also in your default.conf from the security check thread.

I will add text for this.  Thank you.

 

 

Oh and it took me an embarrassing long time to understand what .htaccess does.  10M hits on google but I had to dig around to find out that it's a password popup...

I will add more text about this.  I really appreciate the feedback and any other you may have!

Share this post


Link to post
Share on other sites

I got Deluge working through reverse proxy,
Could you elaborate? When I tried, I couldn't figure out how to get the baseurl to cooperate. Did you use rewrites?

 

I found at least 3 ways to configure deluge but this works for me.  ProxyPassReverse doesn't seem to be needed.  I haven't done complete regression test but so far so good.  One side note: I don't use a container for Deluge, it's on a linux VM with it's own VPN so the deluge IP here is not the unraid IP. No clue if that changes anything.

 

	<Location /deluge>
	ProxyPass http://DELUGE_IP:8112/
	ProxyPassReverseCookiePath / /deluge/
	RequestHeader append X-Deluge-Base "/deluge/"
</Location>	

 

Share this post


Link to post
Share on other sites

You have a dead link in "Installing the Docker on other systems".

Which document is this on?

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/, the readme is dead

 

I was put on hold for validation of my SSL certificate so it deviated from your instructions a bit.  It got me scrambling because you don't always refer to some document with the same name.  Simple things like the private key is ssl.key (BTW, can you have two certificate use the same key?)

Sorry for the continuity issues, I copied and pasted a lot from my personal blog to the linuxserver.io blog and the naming changed. I will go thru it again and update.

 

Why are you signing up for two certs?

 

I had my cert done on "www.mydomain.com" and "mydomain.com"  I read afterwards that for PlexRequest I need to use "something_for_request.mydomain.com".  Doesn't that require another cert?

 

And how to point Apache to the different SSL files is also not in there.  Google fixed that quickly and it's also in your default.conf from the security check thread.

I will add text for this.  Thank you.

 

 

Oh and it took me an embarrassing long time to understand what .htaccess does.  10M hits on google but I had to dig around to find out that it's a password popup...

I will add more text about this.  I really appreciate the feedback and any other you may have!

 

You read some doc, you comment on some doc, it's the circle of life!

Share this post


Link to post
Share on other sites

 

Fixed. We renamed Apacheweb to Apache, forgot to update this documentation.

 

I had my cert done on "www.mydomain.com" and "mydomain.com"  I read afterwards that for PlexRequest I need to use "something_for_request.mydomain.com".  Doesn't that require another cert?

Yes, if you want it running on its own subdomain it does. I know a few members have it as www.mydomain.com/requests

 

 

You read some doc, you comment on some doc, it's the circle of life!

Ain't that the truth

Share this post


Link to post
Share on other sites

You have a dead link in "Installing the Docker on other systems".

Which document is this on?

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/, the readme is dead

 

I was put on hold for validation of my SSL certificate so it deviated from your instructions a bit.  It got me scrambling because you don't always refer to some document with the same name.  Simple things like the private key is ssl.key (BTW, can you have two certificate use the same key?)

Sorry for the continuity issues, I copied and pasted a lot from my personal blog to the linuxserver.io blog and the naming changed. I will go thru it again and update.

 

Why are you signing up for two certs?

 

I had my cert done on "www.mydomain.com" and "mydomain.com"  I read afterwards that for PlexRequest I need to use "something_for_request.mydomain.com".  Doesn't that require another cert?

 

And how to point Apache to the different SSL files is also not in there.  Google fixed that quickly and it's also in your default.conf from the security check thread.

I will add text for this.  Thank you.

 

 

Oh and it took me an embarrassing long time to understand what .htaccess does.  10M hits on google but I had to dig around to find out that it's a password popup...

I will add more text about this.  I really appreciate the feedback and any other you may have!

 

You read some doc, you comment on some doc, it's the circle of life!

 

Gog here you go

 

PlexRequests reverse proxy

 

Originally PlexRequests required it's own subdomain and therefore certificates.  With the newer release this is no longer required so if I were you I'd just go for the method above.

8)

Share this post


Link to post
Share on other sites

Thanks for the pointer. I did not findnthisnone. I was about to use your post as a base to use a subdomain

Share this post


Link to post
Share on other sites

Thanks for the pointer. I did not findnthisnone. I was about to use your post as a base to use a subdomain

 

Another one of my posts? Which one and I'll edit it and stick a link to the method I pointed to above.  :)

Share this post


Link to post
Share on other sites

Thanks for the pointer. I did not findnthisnone. I was about to use your post as a base to use a subdomain

 

Another one of my posts? Which one and I'll edit it and stick a link to the method I pointed to above.  :)

 

Not a thread you started but you gave it some meat:

 

https://lime-technology.com/forum/index.php?topic=40107.0

 

Thanks Gog have added an edit to that post..  ;)

Share this post


Link to post
Share on other sites

And plexrequest reverse proxy is up and running.  Groovy

 

[me=smdion]happy dance[/me]

Share this post


Link to post
Share on other sites

I got Deluge working through reverse proxy,
Could you elaborate? When I tried, I couldn't figure out how to get the baseurl to cooperate. Did you use rewrites?

 

We have a config for Deluge in here jonathanm

 

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

 

 

Scroll towards the bottom.

That worked great, thanks. I was missing the header append option when I tried it before.

Share this post


Link to post
Share on other sites

Anybody got a reverse proxy config for Piwigo?

 

Hey Gog,

 

I don't use Piwigo, but thought I'd load it up and see if I can solve this one.

 

There are two options

 

1.  Run in a separate subdomain - This is by far the easiest option...  ;)

so url would be photos.server.com

(Photos could be changed to whatever you want naturally)

 

2. Edit both the default.conf for the Apache container and the default.conf for the Piwigo container. 

Making basic changes to both it is possible to get this working on server.com/gallery (It is possible to change the name gallery to something else but would again require changes to the name of the folder in the www directory in the Piwigo container.

 

Essentially the default.conf in the Piwigo container should read

<VirtualHost *:80>
DocumentRoot /config/www/

<Directory /config/www/gallery/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

 

And the relevant bit in the Apache container default.conf would be

<Location /gallery>
	ProxyPass http://192.168.0.1:8095/gallery
	ProxyPassReverse http://192.168.0.1:8095/gallery
</Location>

 

If you do want to change gallery to something else, then in the configs above change every instance of gallery to whatever you like, then in the config folder of Piwigo then do two extra steps.

 

1.  Go into the www folder in the Piwigo container and rename gallery to whatever it is you chose

2.  Restart the piwigo docker container.

 

That should work.

 

Found this quite testing tbh as essentially trying to juggle two Apache configs at the same time, interesting nonetheless.

 

I haven't tested it extensively so please do before you commit a ton of time configuring the rest of it and please let me know how you got on with it.

 

Hope that helps.

Share this post


Link to post
Share on other sites

Thanks CHBMB, works for me too.  I'll use piwigo for a while through that, see how it goes.

 

 

Share this post


Link to post
Share on other sites

Thanks CHBMB, works for me too.  I'll use piwigo for a while through that, see how it goes.

 

Glad it worked for you.  Having given this some thought, I need to chat to a few of the other ls.io guys but we may be able to patch the container so you don't need to do the piwigo edits and only edit the Apache container.

 

Try using this as the default.conf in your piwigo appdata.

 

<VirtualHost *:80>
DocumentRoot /config/www/

RedirectMatch ^/$ /gallery/

<Directory /config/www/gallery/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Share this post


Link to post
Share on other sites

Try using this as the default.conf in your piwigo appdata.

 

<VirtualHost *:80>
DocumentRoot /config/www/

RedirectMatch ^/$ /gallery/

<Directory /config/www/gallery/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

 

Done, still works

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.