Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-22-2025, 05:28 AM   #1
Freedoom
Confirmed User
 
Industry Role:
Join Date: Feb 2006
Posts: 2,793
Roboscripts Nginx conf

Hello,

I still have some sites running with robot scripts, and I have moved to a new server, but for some reason, the performer's page and tags aren't working. When I click on the models, it just shows me the index page, not the performer page. Same thing with the tags.

Does anyone have any working nginx conf? Or anyone knows how to fix my config?
Thanks

Edit: I forgot to mention that my performer's page is like this: https://domain.com/user/performersname/
And tags are: https://domain.com/tag/anal/

This is my conf:

Code:
server {
          listen 80;
      listen 443;
      server_name domain.com www.domain.com;
          access_log /var/log/nginx/domain.com.log combined;
          error_log /var/log/nginx/domain.com.error_log warn;
    ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
      root /home/httpd/html/domain.com/public_html;
          index index.php;

location ~ /.well-known { root /var/www; allow all; }

rewrite ^/user/(.*)$ /user/index.php?url=$1;

rewrite ^/page/(.*)$ /index.php;
rewrite ^/category/(.*)$ /index.php;

rewrite ^/tag/(.*)$ /./tag/index.php?url=$1;
rewrite ^/sitemap_index\.xml$ /./sitemap/cb.sitemap_index.php?id=1 last;
rewrite ^/sitemap\.xml(.*)$ /./sitemap/cb.sitemap_page.php?$query_string last;

location ~* \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gz|gzip|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|ogv|otf|pdf|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|t?gz|tif|tiff|ttf|wav|webm|wma|woff|wri|xla|xls|xlsx|xlt|xlw|zip|png|jpg|jpeg|gif|ico|js|css)$ {
            expires max;
            access_log off;
            log_not_found off;
            add_header Vary Accept-Encoding;
            add_header Pragma public;
            add_header Cache-Control "max-age=31536000, public";
            etag off;
}



location ~ /\. { deny all; }


location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass php56-fpm;
                fastcgi_index index.php;
                fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
                fastcgi_read_timeout 1200;
                fastcgi_max_temp_file_size 0;
                fastcgi_buffer_size 4K;
                fastcgi_buffers 64 4k;

                }

}
__________________
List Of Sex Cams

Last edited by Freedoom; 01-22-2025 at 05:37 AM.. Reason: added more information
Freedoom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-24-2025, 03:19 PM   #2
Freedom6995
Friends of Venus founder
 
Freedom6995's Avatar
 
Industry Role:
Join Date: Jul 2010
Posts: 1,962
I asked: do you see any errors in this code?

Answer:

Yes, there are several issues and improvements that can be made to this Nginx configuration:

1. **Port 443 and SSL Configuration Missing `ssl` Directive:**
- When listening on port 443, SSL should be explicitly enabled with the `ssl` directive:
```nginx
listen 443 ssl;
```

2. **Mixed Configuration Directive Styles:**
- It's better to separate and organize your configurations for port 80 and 443 for clarity, especially if you implement HTTP to HTTPS redirection.

3. **Potential Overuse of `rewrite`:**
- Some usages of `rewrite` may not require the complexity it introduces. Consider using `location` blocks and `try_files` if suitable for static redirects.

4. **Multiple Rewrite Issues:**
- Ensure that the rewrite rules make sense logically and syntactically. There are potential issues, like `rewrite ^/tag/(.*)$ /./tag/index.php?url=$1;` where `./` may be unintended.
- Rewrites can be performance-heavy; evaluate if they are all necessary or if there could be a more efficient way to handle routing.

5. **File Type Regex Pattern:**
- The exhaustive list of file extensions may include some unnecessary ones, and using them in a single regex pattern can slow down request processing. Consider simplifying this or breaking it into multiple `location` blocks if needed.

6. **Denial of Access to Hidden Files:**
- The `location ~ /\. { deny all; }` block can protect hidden files (those starting with a dot), but this block might overlap with the `.well-known` location. Value specificity in location matching.

7. **Misconfigured ETag:**
- `etag off;` isn't a default directive. It's generally managed via `etag` or `add_header ETag $etag;`.

8. **`fastcgi_pass`:**
- This directive assumes you have a PHP-FPM upstream named `php56-fpm`. Ensure your upstream is correctly configured or using a socket path.

9. **Server-wide or Location-based Security Headers:**
- Consider adding basic security headers such as `Strict-Transport-Security` (HSTS), `X-Content-Type-Options`, `X-Frame-Options`, or `Content-Security-Policy` if relevant to your application needs.

10. **`access_log off;` Directive:**
- Turning off logging can help with performance but should be used judiciously to aid in debugging when needed.
__________________
Email: freedom6995 . protonmail.com
Freedom6995 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-24-2025, 03:20 PM   #3
Freedom6995
Friends of Venus founder
 
Freedom6995's Avatar
 
Industry Role:
Join Date: Jul 2010
Posts: 1,962
this was the code it spit out:

Code:
server {
    listen 80;
    server_name domain.com www.domain.com;
    
    # Redirect all HTTP to HTTPS
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name domain.com www.domain.com;
    
    ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
    
    root /home/httpd/html/domain.com/public_html;
    index index.php;

    access_log /var/log/nginx/domain.com.log combined;
    error_log /var/log/nginx/domain.com.error_log warn;

    location ~ /.well-known {
        root /var/www;
        allow all;
    }

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

    # Example for static content caching
    location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf)$ {
        expires max;
        log_not_found off;
        add_header Cache-Control "public";
    }

    location ~ /\. {
        deny all;
    }

    location ~ \.php$ {
        fastcgi_pass php56-fpm;  # Ensure the upstream here matches your PHP-FPM configuration
        include fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
__________________
Email: freedom6995 . protonmail.com
Freedom6995 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-24-2025, 03:43 PM   #4
Shoplifter
Richest man in Babylon
 
Shoplifter's Avatar
 
Industry Role:
Join Date: Jan 2002
Location: Posts: 10,002
Posts: 5,678
Did you update Yoast?

This was the problem we saw with newer versions of Yoast.
Shoplifter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-24-2025, 06:04 PM   #5
Freedoom
Confirmed User
 
Industry Role:
Join Date: Feb 2006
Posts: 2,793
Quote:
Originally Posted by Shoplifter View Post
Did you update Yoast?

This was the problem we saw with newer versions of Yoast.
It was the php version of roboscripts not the WP version.

Its fixed now. Thanks
__________________
List Of Sex Cams
Freedoom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
rewrite, location, conf, off;, page, add_header, tags, /index.php;, listen, index, last;, public;, access_log, index.php;, all;, 4k;, server, nginx, root, log_not_found, max;, expires, ^/category$, ^/page$, /user/index.php?url=$1;



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.