XF 1.5 Few miscellaneous issues setting up transferred forums (SEO for NGINX, Avatar problems, Sidebars)

Hi there! Some of you might recognize me for a thread that I made in the installation problems subforum last week or so. I was able to work through the problems there, but after a rather successful installation and a moment of pride for myself, we've hit a few more issues. The most major one is that enabling friendly URLs. On our former forums, they were enabled with no issue, but so far I haven't been able to get them to work properly on this new webserver. We're using NGINX, which should be the same as the original, but when attempting to follow the guide offered by Xenforo and a few threads that I've found here, I can't seem to get them to work. Additionally, our users are reporting problems when trying to upload avatars, they won't actually change, even though it says they had a successful upload. If they remove the current avatar it disappears and becomes a default/broken image, but if they upload anything after that it once again reverts to their old avatar. One final issue is that I can't seem to find where the information for this one sidebar is found within our style templates. Its the sidebar that reads Play Now/Vote/Donate. https://galactic-citizen.com/index.php

Any help would be greatly appreciated!
 
Have a look here:

https://xenforo.com/community/threads/nginx-friendly-urls.138736/post-1200388

Seems to be a similar problem to yours, he has posted a possible solution too.
Hrm. Tried to follow this as well and it didn't solve my issues either.

Here's the Server Settings segment of my nginx.conf (nested within html, of course)

Code:
##
# Server Settings
##

        server {

                location ~ /$  {
        try_files $uri $uri/ /index.php?$uri&$args;
        index index.php index.html;
        }

                location /install/data/ {
        internal;
        }

                location /install/templates/ {
        internal;
        }

                location /internal_data/ {
        internal;
        }

                location /library/ {
        internal;
}
 
Well, if figuring out this issue with friendly URLs is gonna take a while longer, I would appreciate it if anyone could help me find the source for this sidebar's code so I can edit it.
 
Honest reply for NGINX... install CentOS and use CentMin Mod to control it. It's MUCH easier than trying to set up your own stack.

There are so many different ways to configure NGINX (especially if using advice from the internet) that without delving into the system it can be somewhat hard to trouble shoot.
 
Last edited:
Well, if figuring out this issue with friendly URLs is gonna take a while longer, I would appreciate it if anyone could help me find the source for this sidebar's code so I can edit it.

Search in your templates for widget, it will show you all the templates for the widgets. If it's the html widget then it will be widget_html
 
Search in your templates for widget, it will show you all the templates for the widgets. If it's the html widget then it will be widget_html
When going through my templates it doesn't seem like there are any that are named widget
The site in question is the one that's linked in my signature and its this part of the sidebar on the homepage that I'm trying to find. I've dug through the templates that should be relevant to it but still haven't exactly found it. On the page-source version of the website the code for it is on line 2202-2208
1519721548941.webp
HTML:
        <div class="section buttonBox">
            <div class="secondaryContent">
                <a href="https://galactic-citizen.com/threads/rules.900/"><img src="https://i.imgur.com/MoY83se.png"></img></a><br>
                <a href="https://starbound-servers.net/server/6881/vote/"><img src="https://i.imgur.com/E2noXYI.png"></img></a><br>
                <a href="https://paypal.me/GalaxyCitizen"><img src="https://i.imgur.com/TKWIBqO.png"></img></a>
            </div>
        </div>
 
Sorry I was thinking of XF2. That's probably the widget framework addon?

I've never used widgets in XF1 so I'm unsure of how it works but if that's the widget framework then I'd post in its discussion thread.
 
Sorry I was thinking of XF2. That's probably the widget framework addon?

I've never used widgets in XF1 so I'm unsure of how it works but if that's the widget framework then I'd post in its discussion thread.

7859aa91e6f52204d1a93b7b011db1e8.png

https://gyazo.com/7859aa91e6f52204d1a93b7b011db1e8
? :whistle:


Finally found the bugger while running through all the style templates, for some reason it was under forum_list. No idea why but the only lingering issue now is just friendly URLs, and that's more of just a stylistic one since with the play button fixed its not an outstanding issue to any of the functions on the forums.
 
Last edited:
Failing that then it must be a part of your theme?
Fixed now! Dunno about Perry's suggestion on solving the friendly URLs though. To change the stack for our webserver I'd essentially have to go to my providers and have them clear everything and install with a new OS.

Should I just try to put stuff in .htaccess to see if it works?
 
The code you were using should be right, I notice it has no server information though such as the domains and port, maybe it needs to be added to the section that defines that?
 
See if you have this directory: /etc/nginx/sites-available/

In that directory should be a file that represents the domain you are using
Ah yeah, I remember working with that when I was setting up our LEMP stack.
I'll dump the contents here.

Code:
##
# 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.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {

    # SSL configuration
    #
    #listen 443 ssl http2 default_server;
    #listen [::]:443 ssl http2 default_server;
    #include snippets/self-signed.conf;
    #include snippets/ssl-params.conf;
    #
    # 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/html;

    # Add index.php to the list if you are using PHP
    index index.php  index.html index.htm index.nginx-debian.html;

    server_name galactic-citizen.com;
    #return 302 https://$server_name$request_uri;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
    #
    #    # With php7.0-cgi alone:
    #    fastcgi_pass 127.0.0.1:9000;
    #     With php7.0-fpm:
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

        # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
        location ~ /\.ht {
        deny all;
    }

}


# 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;
#    }
#}

server {
    if ($host = galactic-citizen.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80 default_server;
    listen [::]:80 default_server;

    server_name galactic-citizen.com;
    return 404; # managed by Certbot


}

snipped out some of the stuff having to do with ssl but that's basically the file
 
Code:
##
# 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.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {

    # SSL configuration
    #
    #listen 443 ssl http2 default_server;
    #listen [::]:443 ssl http2 default_server;
    #include snippets/self-signed.conf;
    #include snippets/ssl-params.conf;
    #
    # 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/html;

    # Add index.php to the list if you are using PHP
    index index.php  index.html index.htm index.nginx-debian.html;

    server_name galactic-citizen.com;
    #return 302 https://$server_name$request_uri;

    IM NO NGINX EXPERT BUT I'D GUESS INSERT HERE

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
    #
    #    # With php7.0-cgi alone:
    #    fastcgi_pass 127.0.0.1:9000;
    #     With php7.0-fpm:
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

        # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
        location ~ /\.ht {
        deny all;
    }

}


# 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;
#    }
#}

server {
    if ($host = galactic-citizen.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80 default_server;
    listen [::]:80 default_server;

    server_name galactic-citizen.com;
    return 404; # managed by Certbot


}

I've marked above where I'd first try and insert it, I'm by no stretch of the imagination a nginx expert though.
 
I've marked above where I'd first try and insert it, I'm by no stretch of the imagination a nginx expert though.

Unless I misunderstood you, I added the parts I snipped from the copy I posted to the default file under /sites-available to the one you put down minus the uncommented note, but still 404 errors upon turning on Friendly and Content Titles under SEO :cry:
 
Code:
# Default server configuration
#
server {

    root /var/www/html;

    server_name galactic-citizen.com;
    #return 302 https://$server_name$request_uri;

    location / {
    try_files $uri $uri/ /index.php?$uri&$args;
    index index.php index.html;
    }

    location /install/data/ {
        internal;
    }
    location /install/templates/ {
        internal;
    }
    location /internal_data/ {
        internal;
    }
    location /library/ {
        internal;
    }

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    unix:/run/php/php7.0-fpm.sock;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}
        location ~ /\.ht {
        deny all;
    }

}

server {
    if ($host = galactic-citizen.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80 default_server;
    listen [::]:80 default_server;

    server_name galactic-citizen.com;
    return 404; # managed by Certbot

}

Try that out, failing that you will need someone like @eva2000 to take a look.
 
Top Bottom