Giter VIP home page Giter VIP logo

cpng's Introduction

cpng logo

cpng : Nginx for cPanel

GitHub code size in bytes HitCount

Make your site use Nginx by switching a domain to PHP-FPM in WHM or cPanel MultiPHP Manager.

As simple as that:

  • PHP-FPM is on - domain is served by Nginx
  • PHP-FPM is off - domain is served by Apache

Requirements

Up-to-date cPanel on CentOS 7/6.

Installation

Log into your server as root and execute the following command:

bash <(curl -skL https://raw.githubusercontent.com/zhubanRuban/cpng/master/cpng) install

It will download the tool and integrate into the system.

Important notes

When you enable PHP-FPM for a site, it is served by Nginx, therefore .htaccess rules designed for Apache will not work. Make sure that you prepared corresponding Nginx rules. For your convenience, you can place them into the following files in domain's document root:

  • .ngaccess.http.*.conf rules for http connection
  • .ngaccess.http.*.conf rules for https connection
  • .ngaccess.common.*.conf rules common for both http and https

Then reload nginx with cpng reload

Options

    -h|--help|help  show this help message

    rebuild         rebild Nginx configuration
                    it is also symlinked to /scripts/rebuildnginxconf for convenience to do it cPanel-way
    reload          check configuration, reload Nginx if check succeeds, restart Nginx if reload fails
                    it is also symlinked to /scripts/restartsrv_nginx for convenience to do it cPanel-way

    dryrun          display configuration to be aplied, but do not apply
    show            show applied configuration

    install         install cpng
    update          update cpng
    remove          remove cpng

Uninstallation

cpng remove

Contributing

I appreciate any feedback and bug reports to make the tool even better.

Please share your thoughts here.

Enjoy the hosting!

cpng's People

Contributors

0zhu avatar

Watchers

 avatar

Forkers

micenx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.