Apache can't show a web page properly.

Issues related to applications and software problems
Post Reply
hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Apache can't show a web page properly.

Post by hack3rcon » 2019/05/29 07:10:35

Hello.
I installed a CMS on CentOS 7 but when I browse it then the web page can't show properly. The Apache logs show me:

Code: Select all

# cat /var/log/httpd/access_log 
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET / HTTP/1.1" 200 24588 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/calendar.css HTTP/1.1" 404 272 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/css/styles-m.css HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/css/styles-l.css HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/requirejs/require.js HTTP/1.1" 404 275 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/requirejs/mixins.js HTTP/1.1" 404 279 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/images/logo.svg HTTP/1.1" 404 270 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/css/print.css HTTP/1.1" 404 268 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:03 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/polyfill.js HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:04 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/requirejs-config.js HTTP/1.1" 404 274 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
10.0.2.2 - - [29/May/2019:02:59:04 -0400] "GET /pub/static/version1559030185/frontend/Magento/luma/en_US/mage/polyfill.js HTTP/1.1" 404 271 "http://127.0.0.1:1338/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
And:

Code: Select all

# cat /var/log/httpd/error_log 
[Wed May 29 02:58:59.026543 2019] [mpm_prefork:notice] [pid 3868] AH00170: caught SIGWINCH, shutting down gracefully
[Wed May 29 02:59:00.090045 2019] [core:notice] [pid 3899] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed May 29 02:59:00.091695 2019] [suexec:notice] [pid 3899] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed May 29 02:59:00.115984 2019] [auth_digest:notice] [pid 3899] AH01757: generating secret for digest authentication ...
[Wed May 29 02:59:00.116519 2019] [lbmethod_heartbeat:notice] [pid 3899] AH02282: No slotmem from mod_heartmonitor
[Wed May 29 02:59:00.147523 2019] [mpm_prefork:notice] [pid 3899] AH00163: Apache/2.4.6 (CentOS) PHP/7.2.18 configured -- resuming normal operations
[Wed May 29 02:59:00.147573 2019] [core:notice] [pid 3899] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
Any idea?

Thank you.

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Apache can't show a web page properly.

Post by stevemowbray » 2019/05/29 13:31:51

selinux expects web pages to be under /var/www, not /pub.

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Apache can't show a web page properly.

Post by hack3rcon » 2019/05/30 06:43:33

But I did:

Code: Select all

# chcon -R -t httpd_sys_rw_content_t var/ pub/ generated/

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

Re: Apache can't show a web page properly.

Post by TrevorH » 2019/05/30 08:44:52

Those are all 404 errors. An selinux problem would result in a different error. A 404 means that you probably have your config wrong and it's looking in the wrong place for these files.
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

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: Apache can't show a web page properly.

Post by hack3rcon » 2019/06/02 05:38:18

Something like file not exist?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Apache can't show a web page properly.

Post by aks » 2019/06/02 16:52:41

Yup, or it's "gone to Atlanta"

Post Reply