Nginx Reverse Proxy for WordPress One-click App

March 9, 2017 1.9k views
Nginx WordPress Ubuntu 16.04

Hello,

I installed WordPress with one-click app and was following this tutorial:
https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-16-04-server#step-1-—-installing-apache-and-php-fpm

..and I’m stuck at Step 4, can not see can not see php_info file.

Here’s the log.

==========================================================================
(yesterday)

[Tue Mar 07 06:25:03.271940 2017] [mpmprefork:notice] [pid 12713] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Tue Mar 07 06:25:03.272020 2017] [core:notice] [pid 12713] AH00094: Command line: ’/usr/sbin/apache2’
[Tue Mar 07 07:07:20.663598 2017] [mpm_prefork:notice] [pid 12713] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/lib/letsencrypt/tls
sni01page/] does not exist
[Tue Mar 07 07:07:21.009328 2017] [ssl:warn] [pid 12713] AH01906: b314add6559a372ee4df6d18bd898c47.200a7e860421825b7178a0728225e0c8.acme.invalid:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Mar 07 07:07:21.009508 2017] [mpmprefork:notice] [pid 12713] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations
[Tue Mar 07 07:07:21.009518 2017] [core:notice] [pid 12713] AH00094: Command line: ’/usr/sbin/apache2’
[Tue Mar 07 07:07:30.088756 2017] [mpm_prefork:notice] [pid 12713] AH00171: Graceful restart requested, doing restart
[Tue Mar 07 07:07:30.615716 2017] [mpm_prefork:notice] [pid 12713] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Tue Mar 07 07:07:30.615765 2017] [core:notice] [pid 12713] AH00094: Command line: ’/usr/sbin/apache2’
[Tue Mar 07 13:20:34.208506 2017] [pagespeed:error] [pid 23810] [mod_pagespeed 1.11.33.5-0 @23810] Slow ReadFile operation on file /var/cache/mod
pagespeed/rname/ajXlYOOzLJK9qlgmWfHI8M/http,3A/,2F128.199.247.252/wp-content/uploads/2017/02/SIMregMobile25402x-100x70.jpg,40,40,: 91.507ms; configure SlowFileLatencyUs to change threshold\n
[Wed Mar 08 01:43:45.492343 2017] [pagespeed:error] [pid 26683] [mod_pagespeed 1.11.33.5-0 @26683] Slow ReadFile operation on file /var/cache/mod
pagespeed/rname/ceXlYOOzLJK9qlgmWfHI8M/http,3A/,2Ftechable.io/wp-content/themes/Newspaper/images/sprite/weather/rain-n.png,40,40,: 52.115ms; configure SlowFileLatencyUs to change threshold\n
[Wed Mar 08 02:49:43.002038 2017] [mpm_prefork:notice] [pid 12713] AH00171: Graceful restart requested, doing restart
[Wed Mar 08 02:49:43.297722 2017] [mpm_prefork:notice] [pid 12713] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Wed Mar 08 02:49:43.297766 2017] [core:notice] [pid 12713] AH00094: Command line: ’/usr/sbin/apache2’
[Wed Mar 08 02:56:30.309065 2017] [mpm_prefork:notice] [pid 12713] AH00171: Graceful restart requested, doing restart
[Wed Mar 08 02:56:30.451064 2017] [mpm_prefork:notice] [pid 12713] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Wed Mar 08 02:56:30.451101 2017] [core:notice] [pid 12713] AH00094: Command line: ’/usr/sbin/apache2’
[Wed Mar 08 05:26:04.724687 2017] [mpm_prefork:notice] [pid 12713] AH00169: caught SIGTERM, shutting down
[Wed Mar 08 05:26:05.881319 2017] [mpm_prefork:notice] [pid 1397] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Wed Mar 08 05:26:05.881403 2017] [core:notice] [pid 1397] AH00094: Command line: ’/usr/sbin/apache2’

==========================================================================
(today)

[Wed Mar 08 06:25:03.040079 2017] [mpm_prefork:notice] [pid 1397] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Wed Mar 08 06:25:03.040174 2017] [core:notice] [pid 1397] AH00094: Command line: ’/usr/sbin/apache2’
[Thu Mar 09 01:57:45.009454 2017] [mpm_prefork:notice] [pid 1397] AH00171: Graceful restart requested, doing restart
[Thu Mar 09 01:57:45.103193 2017] [mpm_prefork:notice] [pid 1397] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Thu Mar 09 01:57:45.103237 2017] [core:notice] [pid 1397] AH00094: Command line: ’/usr/sbin/apache2’

==========================================================================
As I check apache2 on 8080,

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 20450/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2526/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2814/master
tcp6 0 0 :::8080 :::* LISTEN 1397/apache2
tcp6 0 0 :::22 :::* LISTEN 2526/sshd
tcp6 0 0 ::1:25 :::* LISTEN 2814/master

==========================================================================

Please help.
Thanks in advance.

2 Answers

I think the one-click installation has firewall enabled by default. Please run this command:

sudo ufw status
  • @c132 @hansen

    The one-click I deployed yesterday when troubleshooting the Apache configurations you and I were working on did indeed have ufw enabled by default, so port 8080 would need to be added to the rule set using:

    sudo ufw allow 8080/tcp
    

    If that still doesn’t work, we’d need to see the configuration in full so we can take a look at it and see if there’s anything that needs to be fixed to get everything in working order.

Thanks @hansen and @jtittle !
Your answers are precious and it’s working now.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!