Main menu

Purple Technician

Din leverantör av System- och tekniklösningar inom IT-området

Tjänster Läs mer

Mjukvara

Utveckling av mjukvara

Utveckling av applikationer och spel

Läs mer
Dator

Datornätverk

Installation, konfigurering, felsökning och support av nätverk, klienter, servrar och programvaror

Läs mer
Konsult

Konsulttjänster

Systemdesign, Weblösningar, IT-säkerhet, Utbildning m.m.

Läs mer

Nginx redirect from public URL to internal IP

Welcome to this turorial on how to config Nginx redirects from a public URL to an internal IP.

First follow step 1-3 on my tutorial LAMP with Raspberry Pi and step 1-7 om my tutorial Install Owncloud 7.01 on Raspberry Pi (Debian).

Login in as root (su) so you don't have to use sudo.

Step 1 - Edit nginx site-config

cd /etc/nginx/sites-enabled

Here you find your config for your site, could be named default or something else (owncloud if you followed my tutorial)

nano owncloud

In this case I will add a camera which is on the internal IP 192.168.0.210.

Add the following in the used server-directive (starts with server { )(Don't forget all the slashes below)

location ^~ /camera1/ {
        proxy_pass http://192.168.0.210/ ;
}

Save and exit nano.

Restart Nginx by

service nginx restart

All done.