MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: weenleen on 2014-12-24, 14:22:38

Title: how to change nginx config in kloxo-MR for specific domain
Post by: weenleen on 2014-12-24, 14:22:38
Hello,

I just installed YOURLS (link shortner script) on my sub-domain  but when I click on the shorten link, I get Error page "file not found"

I tried many solutions but none of them work.

until I come across this one, which suggest to change the nignx config file.
https://github.com/YOURLS/YOURLS/wiki/Nginx-configuration


This is my nginx config file, it is all commented !!


[root@vps conf.d]# cat default.conf
#server {
#    listen       80;
#    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

#    location / {
#        root   /usr/share/nginx/html;
#        index  index.html index.htm;
#    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
#    error_page   500 502 503 504  /50x.html;
#    location = /50x.html {
#        root   /usr/share/nginx/html;
#    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
#}


why it is all commented with # ? doesn't kloxo-MR use the default nginx config file (/etc/nginx/conf.d/default.conf ) ?
I have 2 domains and 2 subdomains on my vps, how can I change only the config file for my yourls.domain.com , without effecting other domains.

Sorry I am an absolute newbie .
Title: Re: how to change nginx config in kloxo-MR for specific domain
Post by: MRatWork on 2014-12-24, 15:10:45
Simple way, copy /opt/configs/nginx/conf/globals/php-fpm_standard.conf to yourls.domain.com.conf and then modified yourls.domain.com.conf. After that, run 'sh /script/fixweb; sh /script/restart-web -y'.
Title: Re: how to change nginx config in kloxo-MR for specific domain
Post by: weenleen on 2014-12-24, 18:44:02
Thank you so much .
It works now!!!!