User Tools

Site Tools


how_to_run_litecart_on_nginx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
how_to_run_litecart_on_nginx [2019/02/21 00:58]
A User Not Logged in
how_to_run_litecart_on_nginx [2020/03/03 04:11] (current)
admin [Nginx configuration example]
Line 1: Line 1:
 ====== How To Run LiteCart On Nginx ====== ====== How To Run LiteCart On Nginx ======
 +
 +LiteCart is made for running on Apache 2.4. This article is an experimental page for all of those who are attempting to run on NginX.
  
 ===== Nginx configuration example ===== ===== Nginx configuration example =====
Line 48: Line 50:
   # Add expire header to static content   # Add expire header to static content
   location ~* \.(eot|gif|ico|jpg|jpeg|otf|pdf|png|svg|ttf|woff|woff2)$ {   location ~* \.(eot|gif|ico|jpg|jpeg|otf|pdf|png|svg|ttf|woff|woff2)$ {
-    expires  7d;+    expires     7d;
     add_header  Vary Accept-Encoding;     add_header  Vary Accept-Encoding;
     access_log  off;     access_log  off;
Line 55: Line 57:
   # Add shorter expire header to CSS/JS content     # Add shorter expire header to CSS/JS content  
   location ~* \.(css|js)$ {   location ~* \.(css|js)$ {
-    expires  1d;+    expires     1d;
     add_header  Vary Accept-Encoding;     add_header  Vary Accept-Encoding;
     access_log  off;     access_log  off;
Line 91: Line 93:
 </code> </code>
  
-===== Turn CentOS 7 into a LEMP Server (May contain errors) ===== +==== See Also ====
- +
-<file> +
-#!/bin/sh +
- +
-## Install EPEL and REMI repositories +
-rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm +
-rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm +
- +
-## Install some tools +
-sudo yum install -y nano curl +
- +
-## Install NGINX +
-sudo yum install -y nginx +
- +
-## Install PHP and PHP-FPM +
-sudo yum install -y php php-fpm php-bcmath php-gd php-mbstring php-mcrypt php-mysqlnd php-soap php-zip +
- +
-## Configure PHP-fpm (see below) +
-sudo nano /etc/php-fpm.d/www.conf +
-#[myuser] group=mygroup +
- +
-## Install MariaDB/MySQL +
-sudo yum install -y mariadb-server +
- +
-# Install phpMyAdmin +
-sudo yum install -y phpmyadmin +
-#sudo chgrp -R nginx /etc/phpMyAdmin +
- +
-## Configure NGINX (see below) +
-sudo nano /etc/nginx/conf.d/phpmyadmin.conf +
-#location /phpMyAdmin { +
-#    root /usr/share/; +
-#    index index.php index.html index.htm; +
-#    location ~ ^/phpMyAdmin/(.+\.php)$ { +
-#      try_files $uri =404; +
-#      root /usr/share/; +
-#      fastcgi_pass unix:/run/php-fpm/www.sock; +
-#      fastcgi_index index.php; +
-#      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; +
-#      include /etc/nginx/fastcgi_params; +
-#    } +
-#    location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { +
-#        root /usr/share/; +
-#    } +
-#} +
-#location /phpmyadmin { +
-#    rewrite ^/* /phpMyAdmin last; +
-#} +
- +
-## Configure NGINX (see below) +
-sudo nano /etc/nginx/nginx.conf +
-#server { +
-#    listen       80; +
-#    server_name  localhost; +
-+
-#    root   /usr/share/nginx/html; +
-#    index  index.php index.html index.htm; +
-+
-#    location / { +
-#        try_files $uri $uri/ =404; +
-#    } +
-#    error_page 404 /404.html; +
-#    error_page   500 502 503 504  /50x.html; +
-#    location = /50x.html { +
-#        root   /usr/share/nginx/html; +
-#    } +
-#    location ~ \.php$ { +
-#        try_files $uri =404; +
-#        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; +
-#        fastcgi_index index.php; +
-#        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; +
-#        include fastcgi_params; +
-#    } +
-#} +
- +
-## Configure PHP-FPM (see below) +
-sudo nano /etc/php-fpm.d/www.conf +
-#listen = /var/run/php-fpm/php-fpm.sock +
-#listen.owner = nobody +
-#listen.group = nobody +
-#user = nginx +
-#group = nginx +
- +
-## Start services upon boot sequence +
-sudo chkconfig nginx on +
-sudo chkconfig php-fpm on +
-sudo chkconfig mysqld on +
- +
-## Start services immediately +
-sudo service nginx start +
-sudo service php-fpm start +
-sudo service mysqld start +
- +
-## Create index.php (echo hello world or phpinfo()) +
-sudo nano /var/www/html/index.php +
- +
-## Install command line browser +
-sudo yum install -y lynx +
- +
-## Open the browser (use Ctrl-Z to exit) +
-lynx http://localhost/+
  
-## Install Ajenti control panel +[[how_to_create_lemp_server|How to create a LEMP server]]
-curl https://raw.githubusercontent.com/ajenti/ajenti/1.x/scripts/install-rhel7.sh sudo sh+
  
-</file> 
how_to_run_litecart_on_nginx.1550707138.txt.gz · Last modified: 2019/02/21 00:58 by A User Not Logged in