External Subdomain to directory in my droplet


I have my domain of my droplet…i create a directory /livezilla/…

I want add a external subdomain to this directory:

I have in: /etc/nginx/sites-avaliable:

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /usr/share/nginx/html;
        index index.php index.html index.htm;

        # Make site accessible from http://localhost/

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                #try_files $uri $uri/ =404;
                try_files $uri $uri/ /index.php?q=$uri&args;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules


server {
        listen 80;
        listen [::]:80;
        root /usr/share/nginx/html/livezilla/;
        index index.php index.html index.htm;

After :

ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/


ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

service nginx restart


but doens’t work…

Just works…

I forgot something?

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This solved my question. Wtf.

server {

        root /usr/share/nginx/html/livezilla;
        index index.php index.html index.htm;

     location ~ \.php$ {

        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;