0

Please note this is my first post here. Not sure if this question fits in the scope of this site. If not, I am happy for it to be closed.

I have a Synology NAS and I want to start a personal website using Wordpress. I have registered for a domain at noip.com and have installed Wordpress on my NAS (along with all the other required packages). noip is redirecting port 80 (which is blocked by my isp) to port 81 (which is not blocked). I have confirmed that the web server is working by placing a 'index.html' file. When I navigate to the URL using my phone, I see the rendered version of 'index.html'. However, when I replace this with 'index.php', I get a 404 error from my PC, and "could not connect to server" from my phone.

The contents of index.php is

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );

I should also add that when I navigate to the internal ip address, I see the wordpress site.

So clearly noip is doing it's job. So is my NAS/web server, else I wouldn't be able to see 'index.html' from my phone. Wordpress must be partly working and at least installed, else I wouldn't be able to see it from the LAN. This leads me to suspect that it is something about the wordpress configuration that is the problem, hence the question on this site.

EDIT:

I found the following in the wp.config.

$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80" and $_SERVER["SERVER_PORT"] != "443") {
    $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
} else {
    $pageURL .= $_SERVER["SERVER_NAME"];
}

Should I change the 80 to 81?

  • You shouldn't need to change any files. In the WordPress settings you need to set the URL to the URL you use to access it externally. – Jacob Peattie Sep 13 '18 at 15:47
  • That sort of half worked. In the setting Site Address (URL), I entered my domain name. Didn't work. Then I entered my domain name, followed by ':81', then it half worked. It loaded without the theme. Just text. Is this expected from an iPhone? – Chechy Levas Sep 13 '18 at 15:55
  • Also, that snippet from wp-config.php is not normal – Tom J Nowell Sep 13 '18 at 15:55
  • What does the snippet do? I don't speak php yet. – Chechy Levas Sep 13 '18 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.