Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP install on Nginx server issue #1679

Closed
Ramenos opened this issue Jan 4, 2021 · 10 comments · Fixed by #1768
Closed

FTP install on Nginx server issue #1679

Ramenos opened this issue Jan 4, 2021 · 10 comments · Fixed by #1768
Assignees
Labels
documentation feedback needed server support installation and configuration issues
Milestone

Comments

@Ramenos
Copy link

Ramenos commented Jan 4, 2021

Hi Shaarli team,
I'm having trouble to install last version of Shaarli via FTP on my server. Any chance there is a documentation about how to install it via FTP?

Here is my install folder: https://www.ramenos.net/liens/
I got the message "Error: missing Composer configuration". I read the documentation attached to this message.

I also added a temporary php info on the server: https://www.ramenos.net/info.php (it looks like all extensions of PHP required are installed).

Just for fun, I tried older versions of Shaarli. Until the 0.7, everything works perfectly and I can setup and use it. From 0.8, I still have this message.

Hopefully, I'm in the right place to ask for help. Thank you!

PS: I'm not super technical so I might have missed a stupid detail.

@agentcobra
Copy link

same as #1678 ?

@Ramenos
Copy link
Author

Ramenos commented Jan 4, 2021

@agentcobra Yes, I don't know why I have 2 tickets, sorry about this. But these 2 are the same yes (I got a 404 from Github the 1st time I tried to publish it).

@ArthurHoaro
Copy link
Member

I think that you downloaded the source code ZIP instead of the ZIP suffixed by -full from the release page.

@Ramenos
Copy link
Author

Ramenos commented Jan 4, 2021

@ArthurHoaro Effectively, I reinstalled everything (0.12.1-full) and now I have a 404s generated by nginx: https://www.ramenos.net/liens/
It seems the service redirects to https://www.ramenos.net/liens/install and then the 404 appears.

Any idea about what would be the next step on this?

Thanks

PS: just realized you are in France. On peut parler français si c'est plus simple :). Désolé pour le tracas.

Update: I was able to install v 0.10.1 (newer version does generate a 404, I don't know why yet).

@ArthurHoaro
Copy link
Member

ArthurHoaro commented Jan 5, 2021

English is usually recommended if other non-French contributors want to pop in.

Can you post your nginx virtual host configuration? Or are you using a shared hosting?

@Ramenos
Copy link
Author

Ramenos commented Jan 5, 2021

@ArthurHoaro Yes, it's a shared hosting. Here is the configuration:

server {
listen *:80;
listen [::]:80;
    server_name ramenos.net www.ramenos.net;

    root   /var/www/ramenos.net/web/;
            disable_symlinks if_not_owner from=$document_root;


    index index.html index.htm index.php index.cgi index.pl index.xhtml;



    error_log /var/log/ispconfig/httpd/ramenos.net/error.log;
    access_log /var/log/ispconfig/httpd/ramenos.net/access.log combined;

    location ~ /\. {
                    deny all;
    }

    location ^~ /.well-known/acme-challenge/ {
                    access_log off;
                    log_not_found off;
                    auth_basic off;
                    root /usr/local/ispconfig/interface/acme/;
                    autoindex off;
                    index index.html;
                    try_files $uri $uri/ =404;
    }

    location = /favicon.ico {
        log_not_found off;
        access_log off;
        expires max;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location /stats/ {

        index index.html index.php;
        auth_basic "Members Only";
        auth_basic_user_file /var/www/clients/client2/web53/web//stats/.htpasswd_stats;
        add_header Content-Security-Policy "default-src * 'self' 'unsafe-inline' 'unsafe-eval' data:;";
    }

    location ^~ /awstats-icon {
        alias /usr/share/awstats/icon;
    }

    location ~ \.php$ {
        try_files /66d5529523319926280faa7bc6bb088b.htm @php;
    }

    location @php {
        try_files $uri =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/lib/php7.0-fpm/web53.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors on;
    }


}

@ArthurHoaro
Copy link
Member

ArthurHoaro commented Jan 10, 2021

fastcgi_pass unix:/var/lib/php7.0-fpm/web53.sock;

Check out server requirements. PHP 7.0 has reached end of life in 2018 and is not supported by Shaarli after v0.10.

It might be your issue. But also, it looks like you are missing important part of server configuration

@ArthurHoaro ArthurHoaro added support installation and configuration issues server labels Jan 10, 2021
@ArthurHoaro ArthurHoaro added this to the 0.12.2 milestone Jan 10, 2021
@ericm5901
Copy link

ericm5901 commented Jan 29, 2021

(EDIT @ArthurHoaro - Formatting)

Hello,

trying to install shaarli, I have also the problem "/install not found".

Here are some infos. .

Thank you for the help

infos.

Wnmp stack version 3.1.0, with php 7.1.8, nginx 1.13.4

log.

"2021/01/29 19:52:02 [error] 2684#4028: *29 CreateFile() "J:\Wnmp/html/shaarli/install" failed (2: FormatMessage() error:(15105)), client: 127.0.0.1, server: localhost, request: "GET /shaarli/install HTTP/1.1", host: "localhost""

nginx conf

worker_processes  1;

error_log  logs/error.log;
pid        logs/nginx.pid;

events {
    # Max value 16384
    worker_connections  8192;
    # Accept multiple connections
    multi_accept on;
}

# Settings that affect all server blocks
http {
    include php_processes.conf;
    include       mime.types;
    default_type  application/octet-stream;

    access_log  logs/access.log;

    sendfile on;
    
    keepalive_timeout  65;
    ssl_session_timeout 10m;
    ssl_protocols TLSv1.2 TLSv1.1 TLSv1 SSLv3;
    ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5:!DSS; 
    ssl_prefer_server_ciphers on;
    gzip  on;
    # http server

# Begin HTTP Server
server {
    listen 80; # IPv4
    server_name localhost;

    ## Parametrization using hostname of access and log filenames.
    access_log logs/localhost_access.log;
    error_log logs/localhost_error.log;

    ## Root and index files.
    root html;
    index  index.php index.html index.htm;

    ## If no favicon exists return a 204 (no content error).
    location = /favicon.ico {
        try_files $uri =204;
        log_not_found off;
        access_log off;
    }
        
    ## Don't log robots.txt requests.
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    ## Try the requested URI as files before handling it to PHP.
    location / {

        ## Regular PHP processing.
        location ~ \.php$ {
            try_files  $uri =404;
            fastcgi_pass   php_processes;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

        ## Static files
        location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ {
            expires max;
            log_not_found off;
            ## No need to bleed constant updates. Send the all shebang in one
            ## fell swoop.
            tcp_nodelay off;
            ## Set the OS file cache.
            open_file_cache max=1000 inactive=120s;
            open_file_cache_valid 45s;
            open_file_cache_min_uses 2;
            open_file_cache_errors off;
        }

        ## Keep a tab on the 'big' static files.
        location ~* ^.+\.(?:ogg|pdf|pptx?)$ {
            expires 30d;
            ## No need to bleed constant updates. Send the all shebang in one
            ## fell swoop.
            tcp_nodelay off;
        }
        } # / location

} 
# End HTTP Server

# Begin HTTPS Server
server {
    listen 443 http2 ssl;
    server_name localhost;
    ssl_certificate      cert.pem;
    ssl_certificate_key  key.pem;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;

    ## Parametrization using hostname of access and log filenames.
    access_log logs/localhost_access.log;
    error_log logs/localhost_error.log;

    ## Root and index files.
    root html;
    index  index.php index.html index.htm;

    ## If no favicon exists return a 204 (no content error).
    location = /favicon.ico {
        try_files $uri =204;
        log_not_found off;
        access_log off;
    }

    ## Don't log robots.txt requests.
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    ## Try the requested URI as files before handling it to PHP.
    location / {

        ## Regular PHP processing.
        location ~ \.php$ {
            try_files  $uri =404;
            fastcgi_pass   php_processes;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

        ## Static files are served directly.
        location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ {
            expires max;
            log_not_found off;
            ## No need to bleed constant updates. Send the all shebang in one
            ## fell swoop.
            tcp_nodelay off;
            ## Set the OS file cache.
            open_file_cache max=1000 inactive=120s;
            open_file_cache_valid 45s;
            open_file_cache_min_uses 2;
            open_file_cache_errors off;
        }

        ## Keep a tab on the 'big' static files.
        location ~* ^.+\.(?:ogg|pdf|pptx?)$ {
            expires 30d;
            ## No need to bleed constant updates. Send the all shebang in one
            ## fell swoop.
            tcp_nodelay off;
        }
        } # / location
} # End HTTPS Server
}

@ArthurHoaro
Copy link
Member

try_file directive in this section of the documentation is required to make URL rewriting work properly:

# relative path to shaarli from the root of the webserver
location / {
  # default index file when no file URI is requested
  index index.php;
  try_files _ /index.php$is_args$args;
}

Note that Shaarli is usable without URL rewriting.

@ericm5901
Copy link

ericm5901 commented Jan 31, 2021

Thanks, following your recommendation, and with some trials, it'ok with this in the ngnx.conf (from wnmp stack) :

## Try the requested URI as files before handling it to PHP.    location / {
		## ...
		## ...		
		location /shaarli/ {
			try_files $uri /shaarli/index.php$is_args$args;
			access_log  logs/shaarli.access.log;
			error_log   logs/shaarli.error.log;
		}
	} # / location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation feedback needed server support installation and configuration issues
Projects
None yet
5 participants