Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 18:08:42

Author Topic: how to change nginx config in kloxo-MR for specific domain  (Read 4967 times)

0 Members and 1 Guest are viewing this topic.

Offline weenleen

  • Junior Member
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
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 .

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: how to change nginx config in kloxo-MR for specific domain
« Reply #1 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'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline weenleen

  • Junior Member
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: how to change nginx config in kloxo-MR for specific domain
« Reply #2 on: 2014-12-24, 18:44:02 »
Thank you so much .
It works now!!!!

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.031 seconds with 22 queries.

web stats analysis