Score:0

Nginx phpbb3 2 urls

in flag

I have Nginx installed and i want to config the forum.

The url EXAMPLE: example.com Forum phpbb3 Access : example.com Another web into the same domain: example.com/web Nginx forum path /var/www/html/foro (example.com) Nginx web path /var/www/html/web (example.com/web)

I created the Nginx configuration, but only let me to access to example.com, if i put example.com/web or example.com/{whatever you like}, automaticaly redirect to example.com, so i dont know where is redirecting me allways to example.com. The forum works fine, but i need to take away the redirection just to access to example.com/web, without any problem

Anyoane can help me with this configuration?

    # Remove www domain prefix.
server {
        listen 80;
        # IPv6
        listen [::]:80;

        return 301 $scheme://example.com$request_uri;                      # change /etc/hosts file with the ip and phpbb-test-mysite.com
}

# Board configuration.
server {
        listen 80;
        # IPv6
        listen [::]:80;
        server_name example.com;
        root /var/www/html/foro;

        # phpBB uses index.htm
        index index.php index.html index.htm;

        # Loggers
        error_log /var/log/nginx/phpbb.error.log warn;
        access_log /var/log/nginx/phpbb.access.log;
        location / {
        try_files $uri $uri/ @rewriteapp;

                # Pass the php scripts to FastCGI server specified in upstream declaration.
                location ~ \.php(/|$) {
                        include fastcgi.conf;
                        fastcgi_split_path_info ^(.+\.php)(/.*)$;
                        fastcgi_param PATH_INFO $fastcgi_path_info;
                        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                        fastcgi_param DOCUMENT_ROOT $realpath_root;
                        try_files $uri $uri/ /app.php$is_args$args;
                        fastcgi_pass php;
                }

                # Deny access to internal phpbb files.
                location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb(?!\w+)|store|vendor) {
                        deny all;
                        # deny was ignored before 0.8.40 for connections over IPv6.
                        # Use internal directive to prohibit access on older versions.
                        internal;
                }
        }

        location @rewriteapp {
                rewrite ^(.*)$ /app.php/$1 last;
        }

        # Correctly pass scripts for installer
        location /install/ {
                try_files $uri $uri/ @rewrite_installapp =404;

                # Pass the php scripts to fastcgi server specified in upstream declaration.
                location ~ \.php(/|$) {
                        include fastcgi.conf;
                        fastcgi_split_path_info ^(.+\.php)(/.*)$;
                        fastcgi_param PATH_INFO $fastcgi_path_info;
                        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                        fastcgi_param DOCUMENT_ROOT $realpath_root;
                        try_files $uri $uri/ /install/app.php$is_args$args =404;
                        fastcgi_pass php;
                }
        }
        location @rewrite_installapp {
                rewrite ^(.*)$ install/app.php/$1 last;
        }

        # Deny access to version control system directories.
        location ~ /\.svn|/\.git {
                deny all;
                internal;
        }
}
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.