Jump to content

Search the Community

Showing results for tags 'nginx'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • News
    • The Lounge
  • Community
    • Pre-Sales Questions
    • Support
    • The Marketplace
    • Contribute
    • Show Off
    • Feature Requests
    • Bugs
    • Contests
  • Developer Corner
    • General
    • Extensions
  • BlestaStore's Forum
  • BlestaStore's BlestaCMS
  • BlestaStore's Resellers
  • BlestaStore's BlestaForums
  • BlestaStore's Promotions
  • CubeData's Official Announcements From CubeData
  • CubeData's Peer Support
  • CubeData's Resellers
  • ModulesGarden Club's Topics
  • Blesta Addons's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Wire


Location


Interests

Found 2 results

  1. Hi I write blesta configuration with nginx webserver on the control panel VESTACP. I follow great tutorial @ServZoo but fastcgi not work on vestacp Add to your config locate /home/username/conf/web ###################################################################### location / { error_page 404 = @blesta; #IF file doesn't exist log_not_found off; location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass 127.0.0.1:9007; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } } #Core rewrite location @blesta { rewrite ^(.*)$ /index.php last; # rewrite ^(.*)$ /index.php/(.*) /$1 permanent; } # Disallow access to any file with .pdt extension location ~ (\.pdt) { return 403; } if (!-e $request_filename){ rewrite ^(.*)$ /index.php; } #Core rewrite location @blesta { rewrite ^(.*)$/index.php/(.*) /$1 permanent; } ###################################################################### ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Sample Config: server { listen 123.123.123.123:443; server_name sub.domain.com www.sub.domain.com; root /home/admin/web/sub.domain.com/public_html; index index.php index.html index.htm; access_log /var/log/nginx/domains/sub.domain.com.log combined; access_log /var/log/nginx/domains/sub.domain.com.bytes bytes; error_log /var/log/nginx/domains/sub.domain.com.error.log error; ###################################################################### location / { error_page 404 = @blesta; #IF file doesn't exist log_not_found off; location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass 127.0.0.1:9007; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } } #Core rewrite location @blesta { rewrite ^(.*)$ /index.php last; # rewrite ^(.*)$ /index.php/(.*) /$1 permanent; } # Disallow access to any file with .pdt extension location ~ (\.pdt) { return 403; } if (!-e $request_filename){ rewrite ^(.*)$ /index.php; } #Core rewrite location @blesta { rewrite ^(.*)$/index.php/(.*) /$1 permanent; } ###################################################################### include /etc/nginx/conf.d/phpmyadmin.inc*; include /etc/nginx/conf.d/phppgadmin.inc*; include /etc/nginx/conf.d/webmail.inc*; include /home/admin/conf/web/nginx.sub.domain.com.conf*; } ------------------------------ Open file lib/init.php Search: define("HTACCESS", file_exists(ROOTWEBDIR . ".htaccess")); Replace with: define("HTACCESS", true); --------------------------- Note: 1. listen 123.123.123.123:80 / 443 ==> Replace 123.123.123.123 with your ip server/vps. 2. fastcgi_pass 127.0.0.1:9007 change 9007 with original port after creating domain. We are sorry if the tutorial is already there, I search not found for nginx vestacp so I write here as well as my documentation.
  2. So, I'm not an expert on Blesta or NGINX, but I have learned the easy way to make the two work and wanted to share. Credit to cloudrck for starting the project on github (I have used a lot of his work in the config.) 1.) Fire up a fresh install of Ubuntu 14.04 64-Bit (DigitalOcean works great for testing) 2.) Install EasyEngine (easy way to setup a LEMP server) curl -sL rt.cx/ee | sudo bash ee system install 3.) Create your site with EasyEngine ee site create youdomainname.com --mysql 4.) Install Ioncube cd /usr/local sudo wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz mv /usr/local/ioncube/* /usr/lib/php5/20121212/ nano /etc/php5/fpm/php.ini zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so service php5-fpm restart 5.) Apply PHP 5.5 Hotfix Prepare your files before you upload. Copy the "blesta" folder from the PHP5.5 Hotfix folder to the main "blesta" folder. This will overwrite the files that need to be replaced. Zip up your "blesta" folder contents and upload to your new server instance. 6.) Edit your NGINX Conf cd /etc/nginx/sites-available/ cp *yourdomain.com *yourdomain.com.backup nano You can use the following NGINX config as a starting point (it should work out of the box for you after you edit the paths.) # MYSQL NGINX CONFIGURATION server { listen 80; listen 443 ssl; server_name *your FQN*; access_log /var/log/nginx/*log directory & file* rt_cache; error_log /var/log/nginx/*log directory & file*; root *local directory for Blesta install*; index index.php index.htm index.html; server_name *your FQN*; ssl_certificate *SSL Cert File*.crt; ssl_certificate_key *SSL Key File*.key; location / { error_page 404 = @blesta; #IF file doesn't exist log_not_found off; } #Core rewrite location @blesta { rewrite ^(.*)$ /index.php last; # rewrite ^(.*)$ /index.php/(.*) /$1 permanent; } location ~ \.php$ { try_files $uri =404; # Tweak for Nginx to work with PHP from vendors fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; # Buffer settings increase to compensate for increased time/size due to SSL fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; # fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; fastcgi_pass php; fastcgi_index index.php; include fastcgi_params; } # Disallow access to any file with .pdt extension location ~ (\.pdt) { return 403; } if (!-e $request_filename){ rewrite ^(.*)$ /index.php; } #Core rewrite location @blesta { rewrite ^(.*)$/index.php/(.*) /$1 permanent; } include common/locations.conf; } Now save the file as *yourdomain.com (Press CRTL-X, then Y and type it in.) This should have overwritten the current config (the one you just made a backup of.) 7.) Test & Restart NGINX nginx -t (if all goes well, you will see successful) If successful, then restart service nginx restart 8.) Set database password and create a database (assuming using root user for this tutorial) mysqladmin -u root password YOURnewPASSWORD mysql -u root -p *ENTER PASSWORD* create database DATABASEname; flush privileges; exit 9.) Install Blesta Follow installation instructions. 10.) Make the SEF URL's work cd /var/www/*yourdomain.com/htdocs nano lib/init.php Find the HTACCESS line and replace with this: define("HTACCESS", true); Note: This tutorial does not address security or hardening in any way. I will leave that up to you. I am simply sharing a good starting point to get Blesta up and running. I'm using Ubuntu in this instance as it works great for starting out with EasyEngine and UFW. Feel free to add to this and let me know if I have missed anything!
×
×
  • Create New...