[SOLVED] Access from web

Issues related to configuring your network
Post Reply
Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

[SOLVED] Access from web

Post by Fabien » 2022/06/29 07:56:54

Hello !

Following the advices on that topic : viewtopic.php?p=332524#p332524, I asked for a new virtual machine and had a new one, with the same IP address and the domain name points to the same folder correctly : http://rucheconnectee.mc.

As I'm new to server administration, some problem still happen.

• On this virtual machine, I'm sudoer.

• As the virtual machine is not managed, I installed Apache, PHP, MariaDB, MySQL, etc. I installed all the PHP modules I could in CentOS7 (https://doc.zwiicms.fr/modules-php-requis).

• I uploaded ZwiiCMS into the folder, according to the documentation (https://doc.zwiicms.fr/) in /var/www/html/rucheconnectee.mc.

• The virtualhost.conf file :

Code: Select all

<VirtualHost *:80>
     ServerName rucheconnectee.mc
     DocumentRoot /var/www/html/rucheconnectee.mc
</VirtualHost>
• I started the install and got the message : Jsondb : Écriture interdite dans le fichier de données site/data/admin.json. Vérifiez les permissions. = Jsondb : forbidden access to the data file site/data/admin.json. Check permissions. So, Apache works.

• I posted on the ZwiiCMS forum (https://forum.zwiicms.fr/discussion/com ... mment_2085) and changed the folder's owner, the folder's group and nothing happened. The idea was to put the folder in 775 to allow the installation script to work.

• I then tried to put the folder in 777 as a test, but the error message was the same.

Apparently, the problem lies in the web server configuration. Any idea?

Thanks!
Last edited by Fabien on 2022/07/13 13:50:37, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Access from web

Post by TrevorH » 2022/06/29 10:03:08

Try as root, restorecon -RFv /var/www/html/rucheconnectee.mc
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

Re: Access from web

Post by Fabien » 2022/06/29 11:27:16

@TrevorH Thanks for your reply!
I loaded this command, and tried to access the http://rucheconnectee.mc via Chrome. The error message remains :?

Here's a part of the console display :

Code: Select all

restorecon reset /var/www/html/rucheconnectee.mc/core/vendor/tinymce/plugins/codemirror/codemirror/addon/tern context unconfined_u:object_r:httpd_sys_content_t:s0->system_u:object_r:httpd_sys_content_t:s0
Any tip?

Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

Re: Access from web

Post by Fabien » 2022/07/13 13:50:15

Hello,

I had left the problem aside a few days and started working again on it.

I eventually found the solution. I hadn't input an GNU/Linux console command described in this article : https://www.digitalocean.com/community/ ... n-centos-7

Adjusting Apache Policies Universally
Setting the Apache policy universally will tell SELinux to treat all Apache processes identically by using the httpd_unified boolean. While this approach is more convenient, it will not give you the same level of control as an approach that focuses on a file or directory policy.

Run the following command to set a universal Apache policy:

Code: Select all

sudo setsebool -P httpd_unified 1
The setsebool command changes SELinux boolean values. The -P flag will update the boot-time value, making this change persist across reboots. httpd_unified is the boolean that will tell SELinux to treat all Apache processes as the same type, so you enabled it with a value of 1.

The error messaged disappeared and I've been able to perform the ZwiiCMS installation.

Thanks to all of you for your time and energy!

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: [SOLVED] Access from web

Post by TrevorH » 2022/07/13 18:39:44

That is not the correct solution. That turns off selinux for Apache httpd which is probably the thing running on your server that needs it the most.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply