SELinux and Apache.
SELinux and Apache.
Hello.
I installed Apache and when I browse server IP address then I can see Apache test page. I want to install "Magento" and when I copied "Magento" installation files in "/var/www/html" and browse server IP address then I can't see installation wizard. I guess it is because of SELinux enabled. How can I configure SELinux for "Magento" ?
Thank you.
I installed Apache and when I browse server IP address then I can see Apache test page. I want to install "Magento" and when I copied "Magento" installation files in "/var/www/html" and browse server IP address then I can't see installation wizard. I guess it is because of SELinux enabled. How can I configure SELinux for "Magento" ?
Thank you.
Re: SELinux and Apache.
Run restorecon -RFv /var/ww/html to reset all the bad selinux contexts on the files under /var/www/html.
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
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
Re: SELinux and Apache.
Bad SELinux contexts? I guess after this command something is wrong because when I browse "http://IP/phpinfo.php" then it show me:
Code: Select all
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
Re: SELinux and Apache.
Any idea?
When a wrong SELinux configuration applied on a directory then how can I restore it to default?
When a wrong SELinux configuration applied on a directory then how can I restore it to default?
Re: SELinux and Apache.
You've fixed your selinux problem but now your web server doesn't know how to run .php files so it is just serving them up to clients as text files (because without a php to run, that's all they are).
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
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
Re: SELinux and Apache.
My web server has lamp and I can run ".php" files via "php" command.
Re: SELinux and Apache.
Good. But you cannot via your web server so you need to fix that.
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
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
Re: SELinux and Apache.
Excuse me, I did but I don't that why I can't see "Magento" installation wizard. Can anyone test "Magento"?
Code: Select all
restorecon -RFv /var/www/html
Code: Select all
# ls -Z
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 app
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 auth.json.sample
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 bin
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 CHANGELOG.md
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 composer.json
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 composer.lock
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 COPYING.txt
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 dev
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 generated
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 grunt-config.json.sample
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 Gruntfile.js.sample
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 index.php
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 lib
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 LICENSE_AFL.txt
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 LICENSE.txt
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 nginx.conf.sample
-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 package.json.sample
-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 php.php
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 phpserver
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 pub
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 setup
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 update
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 var
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 vendor
Re: SELinux and Apache.
Some of Your folder app should has write to it, so it should have context: httpd_sys_rw_content_t
Read here: https://access.redhat.com/documentation ... ling_files
Read here: https://access.redhat.com/documentation ... ling_files