LinkStackOrg / LinkStack

LinkStack - the ultimate solution for creating a personalized & professional profile page. Showcase all your important links in one place, forget the limitation of one link on social media. Set up your personal site on your own server with just a few clicks.
https://linkstack.org
GNU Affero General Public License v3.0
2.29k stars 233 forks source link

Installation Bug? #313

Closed GrafikPat closed 1 year ago

GrafikPat commented 1 year ago

Hey I tryied to get Littlelink-custom running on my Debian Server with a Subdomain.

After the 3rd Step i just get a "404 Not Found" message. When i remove /db and replace it with /?4 I can do the 4th Step but only to get another "404 Not Found".

All Logs are clear, without any entry. The only Log i have with some entrys is the Apache2 Access Log.

Does anybody know this Error and how to fix it? Have I made a mistake?

Access Log: https://pastebin.com/WHnSyE3Z PHP 8.1.14 Apache/2.4.38 (Debian) Debian 5.10.149-2~deb10u1 (2022-10-28) i7-7700 CPU @ 3.60GHz

JulianPrieber commented 1 year ago

Users have reported this error multiple times now and our team couldn't reproduce this yet.

Please provide as many details as you can. Perhaps you could repeat the setup by trying again with your current setup and a fresh one, and report your findings here.

I had a look at the code and I can't find any part that could cause exactly this. The only way I could imagine this happening is if PHP can't properly write to your files.

From what I'm understanding during setup, you're redirected to /db and then encounter an error 404. The thing that confuses me here is that /db is a post request, meaning you never access it directly anywhere in the setup process. Furthermore, during setup there shouldn't even be an error 404, all routes including /db which cannot be accessed directly should be redirected to the setup page. Meaning, even if you access /akuwhdkauhdkahwd there shouldn't be an error 404 just a redirect.

Most likely, when you first access the setup page this still works like, so you should still be able to go to /this and be redirected to the first page.

I honestly cannot really say anything about this without being able to reproduce it myself. Because of that, I'd like to ask you to try some things, maybe figuring out exactly when this error occurs. Maybe we can find the cause of this problem this way.

GrafikPat commented 1 year ago

I allready tryied to use a older version with the same problem. And a new Install doesn't change anything.

The redirect funktion seems to work for the first 3 steps. And no /this doesn't redirect me to the setup page.

Yeah we can try some things if you like.

JulianPrieber commented 1 year ago

Could you make a copy of your failed instance and send it to me?

In the meantime, if you want to get your instance working, you can set up a new one then on the first installer page you should be able to skip the setup entirely by visiting /skip. Then you should be able to use your instance like normal.

lastsamurai26 commented 1 year ago

I have now performed the installation several times. My current configuration of the test environment PHP Version 8.2.1

<IfModule mod_ssl.c>
<VirtualHost *:443>
      # Admin email, Server Name (domain name) and any aliases
      ServerAdmin admin
      ServerName domain.de
      ServerAlias www.domain.de
      SuexecUserGroup www.domain.de www.domain.de
      AddHandler fcgid-script .php
      Header always set Strict-Transport-Security "max-age=31536000; includeSubdomains;"
      Protocols h2 http/1.1
      DocumentRoot "/var/www/vhosts/tools/httpdocs/linktree"
      DirectoryIndex index.htm index.html index.php
      SSLEngine on
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
           SSLOptions +StdEnvVars
        </Directory>
        <Directory />
        Options FollowSymLinks
        AllowOverride None
        </Directory>
        <Directory /var/www/vhosts/tools/httpdocs/linktree>
        Options -Indexes +MultiViews +FollowSymLinks +ExecCGI
        FCGIWrapper /var/www/vhosts/tools/php-fcgi/php-fcgi-starter-linktree .php
        Require all granted
        AllowOverride all
        </Directory>
      LogLevel warn
      ErrorLog  /var/www/vhosts/tools/logs/error_littlelink.log
      CustomLog /var/www/vhosts/tools/logs/access_littlelink.log combined
      ServerSignature On
      Include /etc/letsencrypt/options-ssl-apache.conf
      SSLCertificateFile /etc/letsencrypt/live/www.domain.de/fullchain.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/www.domain.de/privkey.pem
</virtualhost>
</IfModule>

Compile Command for php 8.2 '. /configure' '--prefix=/usr/share/php82' '--datadir=/usr/share/php82' '--mandir=/usr/share/man' '--bindir=/usr/bin/php82' '--with-libdir=lib/x86_64-linux-gnu' '-. -includedir=/usr/include/php82' '--sysconfdir=/etc/php82/apache2' '--with-config-file-path=/etc/php82/apache2' '--with-config-file-scan-dir=/etc/php82/conf. d' '--mit-libxml' '--enable-session' '--enable-xml' '--enable-simplexml' '--enable-filter' '--disable-debug' '--enable-inline-optimization' '--disable-rpath' '--disable-static' '--enable-shared' '--with- pic' '--mit-gnu-ld' '--enable-gd' '--mit-jpeg' '--mit-png' '--mit-xpm' '--enable-exif' '--mit-zlib' '--mit-bz2' '--mit-curl' '--mit-ldap' '--mit-freetype' '--enable-soap' '--enable-sockets' '-- enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-bcmath' '--with-zip' '--with-pear' '--with-openssl' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-phar' '--enable-pdo' '--with- mysqli' '--mit-mysql-sock' '--mit-pdo-mysql' '--mit-mysqlnd' '--mit-imagick' '--mit-mcrypt' '--mit-opcache' '--mit-intl' '--mit-gmp' '--mit-apcu' '--mit-webp' '--mit-sodium' '--mit-ds'

Maybe you can give us more information on how you have configured the web server.

GrafikPat commented 1 year ago

Thanks @lastsamurai26 and @JulianPrieber, after I copied your Vhost config and replaced it with mine everthing works fine.

Maybe you could add a short installation guide with the vhost config as a example.

lastsamurai26 commented 1 year ago

maybe yo ucan share your config with us and we can see what is different to mine ?

GrafikPat commented 1 year ago

It just was a basic config with no specials and so on.

ServerAdmin admin@domain.de ServerName bio.domain.de DocumentRoot /var/www/littlelink-custom DirectoryIndex index.htm index.html index.php Options +FollowSymlinks AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/littlelink-custom.error.log CustomLog ${APACHE_LOG_DIR}/littlelink-custom.access.log combined SSLEngine on SSLCertificateFile /etc/letsencrypt/live/bio.domain.de/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/bio.domain.de/privkey.pem Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" Header set Referrer-Policy “no-referrer-when-downgrade”