Index Page on Developing Site

frm

Well-known member
I'm about to purchase another license and install it on a live site. However, this will put index.php there.

While I want to view the forum, I want others to view a placeholder page of index.html.

Is this possible to have both and somehow work around the landing page to the actual forum that's turned off?

It'll be running on an NGINX server so unsure if this is possible... maybe have to move it from a folder into the root directory when done? But unsure if that will mess up file paths if I install it that way.

Thanks!
 
Solution
Just install it in a sub directorry -- e.g. /test -- then move the installation to the root once it is ready to go live.

All you need to do is update the Board URL in the ACP.

frm

Well-known member
I think this answers my question, but it's for 1.5.

 

Brogan

XenForo moderator
Staff member
Just install it in a sub directorry -- e.g. /test -- then move the installation to the root once it is ready to go live.

All you need to do is update the Board URL in the ACP.
 
Solution

Tracy Perry

Well-known member
Just as an aside, typically most nginx installations will default to serving (if it exists) the index.html page prior to index.php. You have to specifically append index.php to the domain if you want that served instead of the .html file.
 

frm

Well-known member
Just as an aside, typically most nginx installations will default to serving (if it exists) the index.html page prior to index.php. You have to specifically append index.php to the domain if you want that served instead of the .html file.
I'm running CMM so don't know how it deals with it...
 

Tracy Perry

Well-known member
I'm running CMM so don't know how it deals with it...
Pretty sure you can modify the nginx.conf in /usr/local/nginx/conf/ and find the index index.php index.html index.htm and change the order up so that it looks like index index.html index.htm index.php so that it serves those first and index.php as the last option if the first two don't exist.
 

frm

Well-known member
Pretty sure you can modify the nginx.conf in /usr/local/nginx/conf/ and find the index index.php index.html index.htm and change the order up so that it looks like index index.html index.htm index.php so that it serves those first and index.php as the last option if the first two don't exist.
How would I override that as the admin though?
 

Brogan

XenForo moderator
Staff member
What @Tracy Perry means is you would manually navigate to site.com/index.php but all other visitors who accessed the domain would be redirected to site.com/index.html, for which you would have a landing/holding/splash page.
 

Tracy Perry

Well-known member
I'm assuming that this would not allow for friendly URLs though?
Shouldn't affect them if you are simply rearranging the index page served first. It does require SSH access (which I assume you have if you installed CentMin) to go to the config file and edit it to reflect which is served first. As @Brogan said, your normal visitors would be served the HTML page you create but you would have to use the format of site.com/index.php to actually hit the forum site instead of the default HTML page.
You DO need to be aware that if you are using multiple domains under CentMin you WILL NEED to make sure that you have no idex.html/htm in the other sites root directory otherwise they will see the default landing page that CentMin has if you change the nginx.conf as it applies to all domains you have.

Screen Shot 2020-08-25 at 12.03.06 AM.png
This is my wordpress site when I use the /index.html to go to since it's served after index.php by default.
 
Last edited:

frm

Well-known member
I'm just going to put up a basic auth. I don't need a landing page unless I plan on collecting emails, and even then, would I get any subscribers? I'll just order another XF2 and build it up enough to launch.

But awaiting an answer for NGINX conf:
 

Tracy Perry

Well-known member
If you are wanting to force WWW on the domain, it won't be in the nginx.conf but in the .conf for the domain. That is created by option 2. It should ask you if you want to use SSL or not also.
This is what works for me (I force non-WWW, but I've changed the example to use WWW). This is in the config file located for the domain in the /usr/local/nginx/conf/conf.d directory.
Code:
## HTTPS-DEFAULT
 server {
 listen [2604:180:0:5::5]:80;
   
   server_name astrowhat.com www.astrowhat.com;
   return 302 https://www.astrowhat.com$request_uri;
   include /usr/local/nginx/conf/staticfiles.conf;
 }


server {
  listen 443 ssl http2;
  listen [2604:180:0:5::5]:443 ssl http2;
  server_name astrowhat.com www.astrowhat.com;
 
Top