problem: unable to load static path of .css, .js, image files with codeigniter4 |
Hello everybody!
I installed Codeigniter 4 on an apache2 server, centos 7 operating system. When accessing the website, I had trouble loading static files such as .css, .js, images. Please help me resolve this issue! application path structure: /var/www/top100mu.com/public_html/public/ /index.php /.htaccess /templates/ /style.css When accessing the style.css file path https://top100mu.com/templates/style.css , I receive a 404 error message: 404 Can't find a route for 'GET: templates/style.css'. Apache Configuration File: <VirtualHost *:80> ServerName top100mu.com DocumentRoot /var/www/top100mu.com/public_html/public DirectoryIndex index.php SetHandler "proxy:fcgi://127.0.0.1:9082 ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" AddHandler php82-fcgi .php Action php82-fcgi /cgi-bin/php82.fcgi <Directory "/var/www/top100mu.com/public_html/public"> AllowOverride All Require all granted </Directory> ErrorLog /var/log/httpd/top100mu.com_error.log CustomLog /var/log/httpd/top100mu.com_access.log combined </VirtualHost> |
Messages In This Thread |
problem: unable to load static path of .css, .js, image files with codeigniter4 - by nguyenhaitruong - 04-10-2024, 10:13 PM
RE: problem: unable to load static path of .css, .js, image files with codeigniter4 - by kenjis - 04-10-2024, 10:51 PM
RE: problem: unable to load static path of .css, .js, image files with codeigniter4 - by nguyenhaitruong - 04-11-2024, 12:45 AM
RE: problem: unable to load static path of .css, .js, image files with codeigniter4 - by kenjis - 04-11-2024, 12:49 AM
RE: problem: unable to load static path of .css, .js, image files with codeigniter4 - by nguyenhaitruong - 04-11-2024, 03:08 AM
|