Question regarding a fresh install on a personal LEMP server?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
NadEFurY
Registered User
Posts: 3
Joined: Sun Dec 30, 2018 8:20 pm
Location: Estonia

Question regarding a fresh install on a personal LEMP server?

Post by NadEFurY » Sun Dec 30, 2018 10:40 pm

Hello there,

I’m fairly new at this so apologies ahead of time for my potential illiteracy regarding all the ins and outs of the very deep parts of configuring everything but I have a problem installing phpBB on my own personal server.

The issue is, I'm running nginx and I can't for the life of me get the data back from when I click the install tab on the introduction screen. The page is reported 404, not found.

This is the nginx conf I'm running. Parts of it are commented out, the commented out bits we're slices I tried according to this guide: https://websiteforstudents.com/install- ... p-support/

(sub.domain.tld and user are changed values, the server is live and hosting my own webmail and a couple of other things)

Code: Select all

server {

        listen 80;
        server_name sub.domain.tld;
        location /.well-known {
                root /var/www/sub.domain.tld/html;
                try_files $uri $uri/ =404;
        }

        location / {
                return 301 https://$host$request_uri;
        }
}

server {

        listen 443 ssl;
        server_name sub.domain.tld;
        auth_basic "Administrator Login";
        auth_basic_user_file /etc/nginx/.htpasswd;

        ssl_certificate /etc/letsencrypt/live/sub.domain.tld/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/sub.domain.tld/privkey.pem;
        ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
        ssl_protocols TLSv1.1 TLSv1.2;

        error_page 500 502 503 504 /50x.html;

        location = /50x.html {

                root /usr/share/nginx/html;
        }

        location / {

                index index.php;
                root /var/www/sub.domain.tld/html/phpBB;
                try_files $uri $uri/ =404;
                #try_files $uri $uri/ @rewriteapp;
        }

#       location /install/ {
#               try_files $uri $uri/ @rewrite_installapp;
#       }

        location ~* \.php$ {

                root /var/www/sub.domain.tld/html/phpBB;
                try_files $uri $uri/ =404;
                include fastcgi_params;
                fastcgi_pass 'unix:/var/run/php-fpm/php-fpm.sock';
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param SCRIPT_NAME $fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
        }

#       location ~ \.php(/|$) {
#
#               fastcgi_split_path_info ^(.+\.php)(/.+)$;
#               fastcgi_index           index.php;
#               fastcgi_pass            unix:/var/run/php-fpm/php-fpm.sock;
#               include                 fastcgi_params;
#               fastcgi_param           PATH_INFO       $fastcgi_path_info;
#               fastcgi_param           SCRIPT_FILENAME $document_root$fastcgi_script_name;
#               fastcgi_param           DOCUMENT_ROOT   $realpath_root;
#               try_files               $uri $uri/      /install/app.php/$1 last;
#       }


#       location @rewrite_installapp {
#
#               rewrite ^(.*)$  /install/app.php/$1 last;
#
#       }
}
And the problem itself is the following:

Code: Select all

192.168.1.5 - user [31/Dec/2018:00:32:50 +0200] "GET /install/app.php/install HTTP/1.1" 404 571 "https://sub.domain.tld/install/app.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763" "-"
The client asks for URL /install/app.php/install which doesn't exist. Now my own idea is that this string is supposted to be rewritten to something else for this thing to work?
Ideas?

I'd really appreaciate it.

Thanks for reading.


PS. I've already followed the install documentation, changed the privileges on files etc. but ofc. questions regarding these things are welcome as well as I may have missed something crucial, although my own imagination is that it has to be a php or nginx bugger.

This server runs CentOS 7, base repos +epel, the php version is 5.4.16, backend MariaDB.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10347
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: Question regarding a fresh install on a personal LEMP server?

Post by Noxwizard » Sun Dec 30, 2018 11:56 pm

Have you tried using the sample nginx configuration file provided in the docs/ folder?
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

User avatar
NadEFurY
Registered User
Posts: 3
Joined: Sun Dec 30, 2018 8:20 pm
Location: Estonia

Re: Question regarding a fresh install on a personal LEMP server?

Post by NadEFurY » Mon Dec 31, 2018 8:39 am

I hadn't, as I well... wasn't aware of it. Which is unfortunate that I hadn't gone further down in the install doc as it actually mentions this. Sorry about that.

But now I did, and it's fixed....

Jesus that was simple(once you have a working example in front of you :) )

Much appreciated, many thanks. Hopefully the rest of it goes smoothly and eventually I can take the password wall off once it's up.

The working nginx conf:

Code: Select all

server {

        listen 80;
        server_name sub.domain.tld;
        
        location /.well-known {
                root /var/www/sub.domain.tld/html;
                try_files $uri $uri/ =404;
        }
 
        location / {
                return 301 https://$host$request_uri;
        }
}

server {

        listen 443 ssl;
        server_name sub.domain.tld;
    	auth_basic "Administrator Login";
   	auth_basic_user_file /etc/nginx/.htpasswd;

        ssl_certificate /etc/letsencrypt/live/sub.domain.tld/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/sub.domain.tld/privkey.pem;
        ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
        ssl_protocols TLSv1.1 TLSv1.2;

        error_page 500 502 503 504 /50x.html;

        location = /50x.html {
                root /usr/share/nginx/html;
        }

# Repairing the following conf by following the nginx example in /usr/share/phpBB/docs/ directory.

        location / {
                root /var/www/sub.domain.tld/html/phpBB;
                index index.php index.html index.htm;
                try_files $uri $uri/ @rewriteapp;
        }

    location @rewriteapp {
       		rewrite ^(.*)$ /app.php/$1 last;
    }

    location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
       		deny all;
    }

        location ~ \.php(/|$) {
                root /var/www/sub.domain.tld/html/phpBB;
                include fastcgi_params;
                fastcgi_pass 'unix:/var/run/php-fpm/php-fpm.sock';
  		fastcgi_split_path_info ^(.+\.php)(/.*)$;
     		fastcgi_param PATH_INFO $fastcgi_path_info;
     	 	fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
     		fastcgi_param DOCUMENT_ROOT $realpath_root;
      		try_files $uri $uri/ /app.php$is_args$args;
        }

    location /install/ {
       		root /var/www/sub.domain.tld/html/phpBB;
        	try_files $uri $uri/ @rewrite_installapp;

            location ~ \.php(/|$) {
                    root /var/www/sub.domain.tld/html/phpBB;
                    include fastcgi_params;
                    fastcgi_pass 'unix:/var/run/php-fpm/php-fpm.sock';
                    fastcgi_split_path_info ^(.+\.php)(/.*)$;
                    fastcgi_param PATH_INFO $fastcgi_path_info;
                    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                    fastcgi_param DOCUMENT_ROOT $realpath_root;
                    try_files $uri $uri/ /install/app.php$is_args$args;
            }


    }

    location @rewrite_installapp {
     		   rewrite ^(.*)$ /install/app.php/$1 last;
    }

    location ~ /\.svn|/\.git {
		   deny all;
    }


}

User avatar
NadEFurY
Registered User
Posts: 3
Joined: Sun Dec 30, 2018 8:20 pm
Location: Estonia

Re: Question regarding a fresh install on a personal LEMP server?

Post by NadEFurY » Mon Dec 31, 2018 3:50 pm

And the forum is up and running and first introductory posts made. Awesome, many thanks to the devs :).

Final conf. atm is essentially the same as previous, without the auth directives.

Post Reply

Return to “[3.2.x] Support Forum”