Closed jessicana closed 2 years ago
Are you using it online or locally ?
Online. I run my website in the root directory on Ubuntu 20.04.2 LTS, nginx/1.21.1, and PHP 8.0.9. MySQL Ver is 8.0.26, and I want to install it in the subdirectory.
Maybe conflict with .htaccess in the parent directory
Pls try running locally using a WAMP/LAMP stack installer to test.
https://bitnami.com/stack/wamp/installer
On Wed, Aug 18, 2021 at 9:39 AM jessicana @.***> wrote:
Online. I run my website in the root directory on Ubuntu 20.04.2 LTS, nginx/1.21.1, and PHP 8.0.9. MySQL Ver is 8.0.26, and I want to install it in the subdirectory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/prashants/webzash/issues/150#issuecomment-900797019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQULDVWZIDTJ7BZ4Z5HY3T5MW67ANCNFSM5B7W3UXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Nginx doesn't support .htaccess
. Check this article, please. I use LEMP stack. Have you tested the installation on LEMP stack and is it required that users only use LAMP stack?
Sorry I haven't tested it with Nginx. Issue is with cakphp 2.x and nginx setup. Maybe try this...
https://book.cakephp.org/2/en/installation/url-rewriting.html#pretty-urls-on-nginx
On Wed, Aug 18, 2021 at 7:06 PM jessicana @.***> wrote:
Nginx doesn't support .htaccess. Check this article https://www.nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/, please. I use LEMP stack. Have you tested the installation on LEMP stack and is it required that users only use LAMP stack?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/prashants/webzash/issues/150#issuecomment-901121254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQULAPEFO4IVTI4QMDWA3T5OZMZANCNFSM5B7W3UXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
https://blog.webnersolutions.com/how-to-install-nginx-and-configure-it-for-cakephp/
Try this also
On Wed, Aug 18, 2021 at 6:11 PM Prashant Shah @.***> wrote:
Sorry I haven't tested it with Nginx. Issue is with cakphp 2.x and nginx setup. Maybe try this...
https://book.cakephp.org/2/en/installation/url-rewriting.html#pretty-urls-on-nginx
On Wed, Aug 18, 2021 at 7:06 PM jessicana @.***> wrote:
Nginx doesn't support .htaccess. Check this article https://www.nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/, please. I use LEMP stack. Have you tested the installation on LEMP stack and is it required that users only use LAMP stack?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/prashants/webzash/issues/150#issuecomment-901121254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQULAPEFO4IVTI4QMDWA3T5OZMZANCNFSM5B7W3UXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Thank you very much for your support!
The software is now installed and working. Thank you for making this happen and for the smooth installation process. The software itself is not complicated to use when it comes to maintaining simple accounting records. For those who wants to run this on Nginx LEMP stack in a subdirectory, please follow these steps:
webzash
and I can access it by visiting my domain: http://domain.com/webzash
webzash
subdirectory, unzip and extract the content there. This means that the content of webzash
download folder will be extracted inside the /webzash subdirectory.webzash
folder. Change the below as appropriate:
sudo chown www-data:www-data -R /var/www/domain.com/html/root/webzash
Edit your Nginx configuration file located in: /etc/nginx/sites-available
. For example:
sudo nano /etc/nginx/sites-available/domain.com
and add:
location ^~ /webzash {
root /var/www/domain.com/html/root;
index index.php;
try_files $uri $uri/ /webzash/index.php;
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
}
Your configuration file will look like this:
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80 ;
listen [::]:80 ;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/domain.com/html/root;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name domain.com www.domain.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
location ^~ /webzash {
root /var/www/domain.com/html/root;
index index.php;
try_files $uri $uri/ /webzash/index.php;
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
}
} # the closing tag of your server opening tag
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
Verify there are no errors:
sudo nginx -t
Restart Nginx
sudo service nginx restart
OR
sudo systemctl restart nginx
http://domain.com/webzash
and you will be prompted to install the software. You will be asked about the following information:
Database type: MYSQL
Database name: DBnameDBname can be changed based on your created database name.
Database host: localhost
Database port: 3306
Database login: DBuser DBuser can be changed based on your created database user login.
Database password: DBpassword DBpassword can be changed based on the password you have for your DBuser.
Database table prefix: Keep empty.admin
admin
for your first login. I help this helps someone else install Webzash on LEMP stack.
Thanks for the guide. I have added a link to this guide from Wiki FAQ.
Hello, I get the below error, how can I fix it?