NamelessMC

Internet Explorer

Internet Explorer is not supported. Please upgrade to a more modern browser.

Question PHP 7.4
Started by Alessio2006&

Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
29 Mar 2024
Topics
41
Posts
1042

Which operating system on the VPS are you using, and in which folder is Nameless installed?

Samerton · about 1 year ago
Alessio2006&

Alessio2006&

Member
Joined
08 Aug 2022
Last Seen
08 Sep 2022
Topics
1
Posts
11

CentOS

/usr/share/nginx/html/

 

Alessio2006& · about 1 year ago
Alessio2006&

Alessio2006&

Member
Joined
08 Aug 2022
Last Seen
08 Sep 2022
Topics
1
Posts
11

I managed to solve it, but now when I go to log in to the site it tells me error 404

Alessio2006& · about 1 year ago
Alessio2006&

Alessio2006&

Member
Joined
08 Aug 2022
Last Seen
08 Sep 2022
Topics
1
Posts
11

I reinstalled the server, and it tells me in General Configuration: Important!

The server must be configured correctly in order to function. To check whether this option can be activated, click here.

To get install.php working, I did this command chmod -R 777 /usr/share/nginx/html

 

Alessio2006& · about 1 year ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
29 Mar 2024
Topics
41
Posts
1042

777 permissions are not typically recommended as they open the files up to any users and groups on the CentOS system.

For installations within /usr/share/nginx/html on CentOS, the following should work, although this can change depending on your particular setup!

chown -R nginx:nginx /usr/share/nginx/html

The chown command will change the ownership of the files to nginx so it is able to write to the files as required.

Samerton · about 1 year ago
Alessio2006&

Alessio2006&

Member
Joined
08 Aug 2022
Last Seen
08 Sep 2022
Topics
1
Posts
11

Nothing has changed

In fact, I have now returned to the error 

The website directory or a subdirectory is not writable. Make sure that all files and directories are owned by the correct user.

 

Example command to change the owner recursively: sudo chown -R www-data: /usr/share/nginx/html

Alessio2006& · about 1 year ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
29 Mar 2024
Topics
41
Posts
1042

Please research online how to set correct file permissions for nginx on CentOS - if the above command does not solve the problem then unfortunately I do not know what the solution is.

Samerton · about 1 year ago