Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Web server NGINX outside connection impossible

Sun Sep 17, 2017 9:06 am

Hi everyone,

I hope someone will have a solution. I'm a newbie in web-server and use of Raspberry PI.

I want to have a little website on my Raspberry which can be watched by outside web. This website is built with the Wordpress CMS.

What I have done :
  • I have linked a DynDNS thanks to my domain provider (OVH a French company). It links my sub-domain with the public IP of my ISP router (it is Freebox, the French company FREE)
  • Permissions are given to NGINX on the folder /var/www/html. They are like this :Image
  • I have created a static IP for the Wifi and Ethernet connection of my Raspberry. I have placed the static IP Ethernet of my Raspberry into the DMZ of my router.
My website (build with Wordpress) is working when I type my sub-domaine in my browser. However, I cannot modify the default theme. When I try to upload any picture I have a message error saying :
Unable to create directory wp-content/uploads/2017/09. Is its parent directory writable by the server?
Image

When I try to watch my website from the ouside web, the web browser takes long time before displaying only the raw text of my website, as if my website couldn't have access the CSS content.

If someones can help that would be really great ! (I've searched but I have found no any answer).

drgeoff
Posts: 7404
Joined: Wed Jan 25, 2012 6:39 pm

Re: Web server NGINX outside connection impossible

Sun Sep 17, 2017 10:11 pm

It isn't the answer to your question but putting your RPi in the router's DMZ is not the wisest of actions from a security viewpoint.

You should instead use port forwarding on the router.

Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: Web server NGINX outside connection impossible

Mon Sep 18, 2017 6:49 am

Thank you for your answer. I will.

Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: Web server NGINX outside connection impossible

Sat Sep 23, 2017 12:30 pm

Nobody has an idea that could help me ?

SurferTim
Posts: 1013
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Web server NGINX outside connection impossible

Sat Sep 23, 2017 12:37 pm

I don't use NGINX, but the message indicates you have a permissions challenge.
Unable to create directory wp-content/uploads/2017/09. Is its parent directory writable by the server?

Khov
Posts: 11
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: Web server NGINX outside connection impossible

Sat Sep 23, 2017 12:40 pm

Thank you for your answer. Indeed, I have given the full right to www-data to let NGINX upload on the database.

SurferTim
Posts: 1013
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Web server NGINX outside connection impossible

Sat Sep 23, 2017 12:45 pm

If you can download the page, but no images, check the page links to the images to insure they are correct. Normally you can right click on the page to view the source.

Edit: If it is a matter of being unable to upload images, your NGINX setup is probably incomplete or incorrect.

SelenaSecret
Posts: 3
Joined: Sat Oct 14, 2017 3:26 pm

Re: Web server NGINX outside connection impossible

Sat Oct 14, 2017 3:48 pm

sudo chmod -r www-data:www-date * ./

sorted my issue out

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 14 guests