1

I have setup a VPS with Ubuntu 14.04, Ajenti panel + Agenti V. Now I am trying to move an installation of Vanilla Forums from one server to another and it's giving me some headaches.

The forums open just fine, I can go through pages, .css files are loading but not .js files.

This is my nginx configuration in Ajenti:

try_files $uri $uri/ @rewrite;

location @rewrite {
  rewrite ^/(.*)$ /index.php?p=$1;
}

location ~ .(js|jpg|png|css)(.+)$ {
  root /srv/anunes/spacacores/;
}

The last part is my solution attempt. It does nothing.

1
  • Can you past full links to js and css files ? Commented Jul 19, 2015 at 5:27

1 Answer 1

1

Ok, let me answer this question without links then :)

.(js|jpg|png|css)(.+)$

This regex says: Any character followed by one of js|jpg|png|css ending with one, or more character(s).

Lets change regex to: \.(js|jpg|png|css)(.*)$ and restart nginx and then try it again.

Why? Probably your js links has format file.js?something and css files does not, so nginx doesn't match main.css at all because it has no character(s) after css part (which is required by .+ regex's part).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.