1
votes

I am moving my cakephp website from my old server to rackspace. I can load my website fine but all the CSS and JS is broken. I'm not sure if it's a Cake setting I'm over looking or a Rackspace setting I'm over looking. I have my cake install in

/var
/www
/rp
/app
/cake
etc
etc

This is the error I see whenever I restart apache. Something isn't lining up. Please, let me know if I need to provide any other information to help resolve this issue. Thanks!

  • Restarting web server apache2 Warning: DocumentRoot [/var/www/app/webroot] does not exist apache2: Could not reliably determine the server's fully qualified domain name, using x.x.x.x for ServerName ... waiting Warning: DocumentRoot [/var/www/app/webroot] does not exist apache2: Could not reliably determine the server's fully qualified domain name, using x.x.x.x for ServerName ...done.
1
Does /var/www/app/webroot exist? Otherwise you might want to update httpd.conf (or whatever) to point to the correct DocumentRoot.arunkumar
No, but /var/www/rp/webroot does exist. My apache settings are currently in apache2.conf, httpd.conf is blank.tjw
Look at the warning when starting apache2. Fix the DocumentRoot in apache2.conf, to /var/www/rp/webroot. I'm guessing the images/CSS/js etc will be fixed too.arunkumar
Right, I've looked through my apache2.conf and I do not see any reference for DocumentRoot. I have set the DocumentRoot settings in my vhost, however, which still does not work.tjw
Are you running Ubuntu on the Rackserver?arunkumar

1 Answers

0
votes

If the DocumentRoot is not specified in apache2.conf, then it defaults to /var/www However, I usually like to put it in my vhosts file. Make sure your vhost file is included. For example:

Include /private/etc/apache2/extra/httpd-vhosts.conf

An example of a vhost file is as follows:

NameVirtualHost *
<VirtualHost *>
        ServerName www.abc.com
        ServerAlias www.abc.com
        DocumentRoot /var/www/rp/app/webroot/
        ErrorLog /var/log/apache2/abc.log
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        </Directory>

</VirtualHost>