Jump to content

I don't even know if I'm in the right place here but i hope you guys can help me so here is the deal:

 

I have set up my raspberry pi to use it as a htpc (using osmc), a plex media server and a "remote wake-on-lan server" (credit)

 

What I am trying to do is to use a reverseproxy using apache2 in order to access plex outside my network using mydomain.com/plex instead of mydomain.com:32400/web.

 

This interferes with the remote wake on lan server and as i have no idea how to actually configure this stuff I'd need help with the following:

I have this 000-default.conf located at /etc/apache2/sites-enabled/

 

<VirtualHost *:80>
    # Non-TLS/SSL configuration.
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/html
    <Directory /var/www/html/>
        AllowOverride AuthConfig FileInfo
        Order allow,deny
        allow from all
        Options -Indexes
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel error

    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

I also have the reverseproxy part figured out using several sources

 

so what i need now is to somehow add this into the above

 

<VirtualHost *:80>
    ServerName [My DNS]
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://localhost:32400/
    ProxyPassReverse / http://localhost:32400/

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/web
    RewriteCond %{HTTP:X-Plex-Device} ^$
    RewriteRule ^/plex/$ /web/$1 [P]
</VirtualHost>

can anyone help me? is this even possible?

 

CPU: Intel i7-6700K @4.8Ghz - MB: ASUS ROG Maximus VIII Ranger - RAM: 2x8GB G.Skill RipJaws V DDR4@2400Mhz - GPU: EVGA FTW GeForce GTX1080 - SSD: Samsung 850 EVO 250GB - HDD: Seagate Desktop HDD 3TB, bunch of old WD 500GB drives, old WD green 1.5TB - Case: AeroCool Mechatron - PSU: EVGA SuperNOVA G2 750 750W - Display: iijama ProLite B2712HDS 27" 1080p Display - Cooling: Enermax Liqmax II 240 - Keyboard: Corsair K70 Cherry-MX Brown - Mouse: Corsair M65 FPS Gunmetal Black - Sound: Logitech X230

Link to comment
https://linustechtips.com/topic/568802-noob-needs-help-with-apache2/
Share on other sites

Link to post
Share on other sites

1 hour ago, Byte said:

Considered using nginx?

I tried that too, using this tutorial, but I could not access the wake on lan page afterwards, every page i opened except for example.com/plex gave me a white page with nothing but the below text and I have no idea how to configure nginx...

Spoiler

Welcome to nginx on Debian!

If you see this page, the nginx web server is successfully installed and working on Debian. Further configuration is required.

For online documentation and support please refer to nginx.org

Please use the reportbug tool to report bugs in the nginx package with Debian. However, check existing bug reports before reporting a new bug.

Thank you for using debian and nginx.

 

CPU: Intel i7-6700K @4.8Ghz - MB: ASUS ROG Maximus VIII Ranger - RAM: 2x8GB G.Skill RipJaws V DDR4@2400Mhz - GPU: EVGA FTW GeForce GTX1080 - SSD: Samsung 850 EVO 250GB - HDD: Seagate Desktop HDD 3TB, bunch of old WD 500GB drives, old WD green 1.5TB - Case: AeroCool Mechatron - PSU: EVGA SuperNOVA G2 750 750W - Display: iijama ProLite B2712HDS 27" 1080p Display - Cooling: Enermax Liqmax II 240 - Keyboard: Corsair K70 Cherry-MX Brown - Mouse: Corsair M65 FPS Gunmetal Black - Sound: Logitech X230

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

×