I set up my test site without SSL on my Ubuntu 22.04 VPS using FASTPANEL. I ran into various issues but got everything working. Once the Let's Encrypt certificate went into effect, it caused a redirect problem. I can access the Studio and my homepage. I used Developer's Tools to check the links on the homepage when logged into it. The links are showing as HTTPS. But I'm getting a looping redirect error. It just keeps trying to load the same page over and over again and crashes. None of the instances of my profile picture will load. I tried checking my NGINX conf and htaccess but I haven't come up with a solution. I changed the HTTP to HTTPS in the headers file in the INC folder. Here is the htaccess (allow_url_include is turned on on server and shows that way in UNA):
Options -MultiViews -Indexes
<IfModule mod_php5.c>
php_flag allow_url_include Off
php_flag register_globals Off
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^m/(.*)$ modules/index.php?r=$1 [QSA,L]
RewriteRule ^page/(.*)$ page.php?i=$1 [QSA,L]
RewriteRule ^s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+) storage.php?o=$1&f=$2 [QSA,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]
RewriteRule ^(.+)$ r.php?_q=$1 [QSA,L]
</IfModule>
AddType image/svg+xml svg
Here is the (edited) conf file:
server {
server_name EXAMPLE.COM ;
listen 000.000.00.00:80;
listen 000.000.00.00:443 ssl;
ssl_certificate "/var/www/httpd-cert/EXAMPLE.COM_2024-12-04-00-00_00.crt";
ssl_certificate_key "/var/www/httpd-cert/EXAMPLE.COM_2024-12-04-00-00_00.key";
charset utf-8;
gzip on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/css text/xml application/javascript text/plain application/json image/svg+xml image/x-icon;
gzip_comp_level 1;
set $root_path /var/www/EXAMPLE_site_usr0/data/www/EXAMPLE.COM;
root $root_path;
disable_symlinks if_not_owner from=$root_path;
location / {
index index.php index.html;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/EXAMPLE.site.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpeg|avi|zip|gz|bz2|rar|swf|ico|7z|doc|docx|map|ogg|otf|pdf|tff|tif|txt|wav|webp|woff|woff2|xls|xlsx|xml)$ {
try_files $uri $uri/ /index.php?$args;
}
location @fallback {
fastcgi_pass unix:/var/run/EXAMPLE.site.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
include "/etc/nginx/fastpanel2-sites/EXAMPLE_site_usr0/EXAMPLE.site.includes";
include /etc/nginx/fastpanel2-includes/*.conf;
error_log /var/www/EXAMPLE_site_usr0/data/logs/EXAMPLE.site-frontend.error.log;
access_log /var/www/EXAMPLE_site_usr0/data/logs/EXAMPLE.site-frontend.access.log;
}
Save me ____________, you're my only hope!