Question

nginx: Install vimbadmin in to subfolder

I tried to install vimbadmin in to subfolder, but i can’t. No matter what configuration i use, vimbadmin never work. This is my last configuration

# vimbadmin
location /vimbadmin {
    alias /usr/share/vimbadmin/public;
    index index.php index.html index.htm;
    location ~ ^/vimbadmin/(.*\.(js|css|gif|jpg|png|ico))$ {
        alias /usr/share/vimbadmin/public/$1;
    }
}

but nginx return me Error: 403 -

*14 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 90.154.205.85, server: mail.devx.biz, request: "GET /vimbadmin/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mail.example.com"

I could not imagine how hard it is.Here is original nginx confiration whick work perfectly on domain/subdomain.

Can you help me with some advices, or example configuration for do that?

Use nginx 1.6.2 with php5-fpm.

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Problem is that in your VHOST you define SCRIPT_FILENAME as $document_root$fastcgi_script_name; but you then use the alias direcive to set the path.

Please try to update line 49 to this:

fastcgi_param SCRIPT_FILENAME $request_filename;

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel