Skip to main content

Posts

Showing posts with the label Apache

CakePHP: JS and CSS files are not loading

When I faced this issue with one of my projects and searched over the internet, out of the suggested solutions, nothing worked. Anyhow, with some luck and R&D, I was able to fix this issue. Hence, sharing it with a larger group to help others who are or will face the same issue as mine.  If apache is your web server and your CakePHP project is in /var/www/html/ folder then please make sure that  AllowOverride All enabled for /var/www/html To enable AllowOverride All for /var/www/html following is an example for  /etc/apache2/sites-available/ 000-default.conf <VirtualHost *:80 >         # The ServerName directive sets the request scheme, hostname and port that         # the server uses to identify itself. This is used when creating         # redirection URLs. In the context of virtual hosts, the ServerName         # specifies what hostname mu...

Automatic Startup of Apache on Linux Server?

To start Apache automatically, follow these steps: Copy Apache startup file to the startup directory: cp /usr/local/apache/bin/apachectl /etc/init.d/             In my case ‘apachectl’  was at location /usr/sbin/apachectl so I have used             cp /usr/sbin/apachectl /etc/init.d/  Edit /etc/init.d/apachectl by inserting these 2 lines in bold :            #!/bin/sh # # chkconfig: - 345 85 15 # description: Apache is a Web server used to serve HTML files and CGI. # # Copyright 2000-2005 The Apache Software Foundation or its licensors, as # applicable. . . . # Apache control script designed to allow an easy command line interface # to controlling Apache.  Written by Marc Slemko, 1997/08/23 . . . Enable httpd to startu...