1

I've been having some performance issues with my local WAMP install and saw a suggestion to move Apache to a different port. I achieved this by updating httpd.conf:

Listen 89
ServerName localhost:89

I also update my vhosts to use the new port:

<VirtualHost *:89> 
    ServerName mysite.local
    DocumentRoot "D:\wamp\www\mysite" 
</VirtualHost>

This works. I can now access the site via mysite.local:89. However, the site appears unstyled because the CSS and JS files are not linked properly. For example, the following CSS file cannot be found:

<link type="text/css" rel="stylesheet" href="http://mysite.local/sites/default/files/css/css_0-h4tIT-Kdty3gonMCX41fM-7MgTrV9BMd5XQoTqeaQ.css" media="all">

I need the CSS and JS to use mysite.local:89 instead of mysite.local. When I change this manually via the web inspector it works.

How can I change the CSS and JS imports to use the new port?

Update on WAMP Slowness

For anyone who is interested, WAMP is running much better now. I followed the recommendations in the following article (specifically, I disabled IPv6, put all host file entries on one line, moved Apache to a new port): http://devside.net/wamp-server/wamp-is-running-very-slow

1 Answer 1

3

It should just be a matter of setting the $base_url in settings.php

If Drupal is generating incorrect URLs on your site, which could be in HTML headers (links to CSS and JS files) or visible links on pages (such as in menus), uncomment the Base URL statement below (remove the leading hash sign) and fill in the absolute URL to your Drupal installation.

For your case that would be:

$base_url = 'http://mysite.local:89';
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.