Compare VPS Hosting and Dedicated Server

ComfortVPS is here to help you find the right hosting, Save Time and Save Money!
Focus on cheap Windows VPS Hosting and Linux VPS Hosting Since 2012, and Dedicated Server NOW

Nginx and PHP and MySql

  • How to stop Nginx server? Start and restart Nginx via command line
    NOTE: This tutorial based on ComfortVPS Nginx Installation Service, but works for all nginx server installed via YUM on CentOS How to stop Nginx server? How to start and restart Nginx via command line? Stop Nginx server command: service nginx stop Start Nginx server command: service nginx start Restart Nginx server command: service nginx restart Test Nginx config file command: service nginx configtest Nginx command line Usage: service nginx {start|stop|restart|condrestart|try-restart|force-reload|upgrade|reload|status|help|configtest}
  • How to connect to SFTP? How to access SFTP?
    SFTP is a SSH File Transfer Protocol (also called Secure File Transfer Protocol ) provide more security as opposed to plain FTP connections assuming the underlying protocol secures the connection.  Typically the port used is 22. SFTP file transfer protocol is part of SSH protocol suite.More information about SFTP is available here. You DO NOT need install additional ftp server software(eg, proftpd, pure-ftpd) if you want use SFTP to transfer files. This means you can save memory and get more security by use SFTP. Now,  How to connect to SFTP? How to access SFTP? SFTP with FileZilla (other sftp client software is similar to...
  • How to setup a Nginx website(How to Config Nginx Virtual Host)
    This tutorial will show you How to setup a Nginx website(How to Config Nginx Virtual Host) with ComfortVPS Nginx Installation Service. Step 1, Create a domain name directory under /www via SFTP, eg,   yourdomain.com, subdomain.abc.com, domain-name.net Step 2, Everything is Done, Config Nginx virtual host is finish, upload your php/html files to that directory then test it. /www directory structure example via SFTP (Another tutorial: How to access SFTP?): NOTE: Don't know how to connect to your SFTP? Here is another tutorial: How to access SFTP? Domain name directory DO NOT need www. eg, You want create a website www.comfortvps.com , just create directory comfortvps.com under /www...
  • How to find your password of SFTP and MySql root and phpMyAdmin?
    How to find your password of SFTP and MySql root and phpMyAdmin if you forgot the passwod ? We recorded the initial password on file at /www/mysql-and-sftp-password.php , you can use ssh command more /www/mysql-and-sftp-password.php to find it. Root password of phpMyAdmin is the same as MySql root. [root@testovz ~]# more /www/mysql-and-sftp-password.php <?php /* phpMyAdmin url: http://your-ip-address/phpMyAdmin4U/ MySql root password is cft.sWVdxb2V1 SFTP username: myweb SFTP password: cft.sWVdxb2V1 NOTE: Please write down the password then delete this file. */ ?> For security reason, Please write down the password then delete this file /www/mysql-and-sftp-password.php How to reset the password if you already deleted this password...
  • How to custom config a Nginx domain? Tutorial of Nginx website custom configuration file
    How to custom config a Nginx domain? This is a tutorial of Nginx website custom configuration file for ComfortVPS Nginx+PHP+MySql Installation Service Nginx configuration file location: Nginx main config file located at /etc/nginx/nginx.conf, You do not need edit this file in most cases. Default configuration file for all domains located at /etc/nginx/conf.d/default.conf, You do not need edit this file in most cases. Extend config file for all domains which included in default.conf located at /etc/nginx/conf.d/my_domainYou can add some futures (eg, if domain=test.com then rewrite ) by edit this config file, already have little example code in it Custom private domain example configuration file: /etc/nginx/conf.d/example.com.confYou can copy this example.com.conf to yourdomain.com.conf, then edit...
  • How to restart PHP FPM? How to start or reload php fpm for nginx?
    This guide assume PHP FPM (FastCGI Process Manager) already installed with Nginx and configured using tcp port (127.0.0.1:9000) How to restart PHP FPM? How to start or reload php-fpm for nginx? Stop PHP FPM command: service php-fpm stop Start PHP FPM command: service nginx start Restart PHP FPM command: service php-fpm restart Reload PHP FPM command: service php-fpm reload PHP-FPM command line Usage: /etc/init.d/php-fpm {start|stop|status|restart|reload|force-reload|condrestart|try-restart} Connecting nginx to PHP FPM: http://wiki.nginx.org/PHPFcgiExample
  • How to custom config PHP-fpm? Configure and optimize php-fpm.conf Tips
    How to custom config PHP-fpm? Configure and optimize php-fpm.conf Tips PHP-FPM configure file location:  /etc/php-fpm.conf Each process takes about 35Mb. Keep this in mind when configuring FPM.  
  • How to enable InnoDB for MySql?
    For low memeory VPS (Free memeory less than 512MB ), our script use MyISAM instead of InnoDB by default If you want enable InnoDB, please make sure your VPS memeory is enough to get mysql work.  Then, vi /etc/my.cnf, delete below 2 lines and restart mysql: innodb=OFFdefault-storage-engine=MyISAM   If you see below error when restart mysql, “InnoDB: Fatal error: cannot allocate the memory for the buffer pool” You will need change some parameter eg. innodb_buffer_pool_size to use less memeory, restarted the MySQL and it was done , error gone .
  • Tutorials of ComfortVPS Nginx+PHP+MySql Installation Service
    Here are some useful tutorials of ComfortVPS Nginx+PHP+MySql Installation Service How to find your password of SFTP and MySql root? How to connect to SFTP? How to upload files? How to create a Nginx website(how to add domain)? How to access phpMyAdmin(how to control MySql database)? How to stop Nginx server? How to start and restart Nginx via command line? How to custom config a Nginx domain? Nginx configuration file location How to stop/restart PHP-fpm? How to custom config and optimize PHP-fpm? How to enable InnoDB for MySql? Note, We wrote these tutorials to save your time, but we do not...