What should index.php contain on Synology NAS to get external access to Wordpress to work?
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 webserver 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 its 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?
Topic wp-config configuration Wordpress
Category Web