Welcome to Centmin Mod Community
Become a Member

Xenforo Issue with uploading

Discussion in 'Forum software usage' started by Jake, Feb 4, 2015.

  1. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Hello Guys,
    I need yalls help! I am having one heck of a time finding this one. I cannot figure out why I cannot upload even small files to my site. I am using xenforo, and they are saying its a php/nginx misconfig. However, I cannot figure out what the issue is. Any one have any guidance?

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    make sure it ain't a permissions issue first - step 2 of Getting Started Guide

     
  3. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    I def have confirmed it is not a permission issue.
     
  4. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    These are simply uploading files to my xenforo, I dont have any problem uploading files directly via SFTP. Let me rephrase this, I am trying to upload attachments on a post in xenforo, or even upload a picture in the gallery returns an error.
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh you mean Xenforo attachment uploads ? what errors you getting ?

    check your server logs for nginx - outlined at How to troubleshoot Centmin Mod initial install issues | Centmin Mod Community

    For specific domainname.com access and error log:
    Code:
      tail -10 /home/nginx/domains/domainname.com/log/access.log
      tail -10 /home/nginx/domains/domainname.com/log/error.log
    
    Xenforo Nginx vhost configured correctly some examples at Xenforo - My Xenforo Nginx vhost configuration | Centmin Mod Community ?
     
  6. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Code:
    2015/02/03 01:17:45 [info] 11613#0: [ngx_pagespeed 1.9.32.3-4448] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    2015/02/03 01:46:47 [info] 22359#0: [ngx_pagespeed 1.9.32.3-4448] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    2015/02/03 02:49:07 [info] 24128#0: [ngx_pagespeed 1.9.32.3-4448] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    2015/02/03 02:49:42 [info] 24177#0: [ngx_pagespeed 1.9.32.3-4448] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    2015/02/03 13:40:59 [alert] 24186#0: *2249 open socket #26 left in connection 6
    2015/02/03 13:40:59 [alert] 24186#0: *2248 open socket #23 left in connection 8
    2015/02/03 13:40:59 [alert] 24186#0: aborting
    2015/02/03 13:54:50 [info] 10582#0: [ngx_pagespeed 1.9.32.3-4448] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: bind() to 0.0.0.0:443 failed (98: Address already in use)
    2015/02/03 16:21:50 [emerg] 12875#0: still could not bind()
    2015/02/03 16:28:02 [info] 12945#0: [ngx_pagespeed 1.9.32.3-4448] No threading detected. Own threads: 1 Rewrite, 1 Expensive Rewrite.
    
    
    Thats what I receive there.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you can ignore the no threading detected info messages Nginx PageSpeed - 1.9.32.1 is not playing well. | Centmin Mod Community it's was fixed and hidden but came back in latester master code for ngx_pagespeed apparently

    what happens when you restart Nginx and PHP-FPM
    Code:
    service nginx restart
    service php-fpm restart
    or via command shortcuts restart separately
    Code:
    ngxrestart
    fpmrestart
    or restart both together Nginx + PHP-FPM
    Code:
    nprestart
    what does your Nginx vhost conf file contents for your domain look like /usr/local/nginx/conf/conf.d/yourdomain.com.conf ?
     
  8. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Code:
    [root@localhost centmin-v1.2.3mod]# nprestart
    nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
    Stopping nginx:                                            [  OK  ]
    Starting nginx:                                            [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    That looked fine!

    And this,

    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    #            listen   80;
    #            server_name thecpforum.com;
    #            return 301 $scheme://www.thecpforum.com$request_uri;
    #       }
    
    server {
      server_name thecpforum.com www.thecpforum.com;
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/thecpforum.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/thecpforum.com/log/error.log;
    
      root /home/nginx/domains/thecpforum.com/public;
    
      location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      # Enable for vBulletin usage WITHOUT vbSEO installed
      try_files             $uri $uri/ /index.php;
    
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  10. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    From the /home/nginx/domains/thecpforum.com/log/error.log

    Code:
    2015/02/03 04:53:45 [error] 24187#0: *104 "/home/nginx/domains/thecpforum.com/public/index.php" is not found (2: No such file or directory), client: 110.75.105.218, server: thecpforum.com, request: "GET / HTTP/1.1", host: "thecpforum.co$
    2015/02/03 04:58:06 [error] 24187#0: *105 "/home/nginx/domains/thecpforum.com/public/threads/looking-for-petiolaris-seeds.3132/index.php" is not found (2: No such file or directory), client: 91.228.167.109, server: thecpforum.com, reque$
    2015/02/03 04:59:54 [error] 24187#0: *106 "/home/nginx/domains/thecpforum.com/public/login/index.php" is not found (2: No such file or directory), client: 165.231.1.147, server: thecpforum.com, request: "GET /login/ HTTP/1.1", host: "ww$
    2015/02/03 04:59:55 [error] 24187#0: *106 "/home/nginx/domains/thecpforum.com/public/index.php" is not found (2: No such file or directory), client: 165.231.1.147, server: thecpforum.com, request: "GET / HTTP/1.1", host: "www.thecpforum$
    2015/02/03 04:59:55 [error] 24187#0: *106 "/home/nginx/domains/thecpforum.com/public/login/index.php" is not found (2: No such file or directory), client: 165.231.1.147, server: thecpforum.com, request: "GET /login/ HTTP/1.1", host: "ww$
    2015/02/03 05:11:10 [error] 24186#0: *143 open() "/home/nginx/domains/thecpforum.com/public/thecpforum2.png" failed (2: No such file or directory), client: 112.198.83.161, server: thecpforum.com, request: "GET /thecpforum2.png HTTP/1.1"$
    2015/02/03 05:11:12 [error] 24186#0: *143 open() "/home/nginx/domains/thecpforum.com/public/thecpforum2.png" failed (2: No such file or directory), client: 112.198.83.161, server: thecpforum.com, request: "GET /thecpforum2.png HTTP/1.1"$
    2015/02/03 05:19:20 [error] 24186#0: *155 open() "/home/nginx/domains/thecpforum.com/public/forums/sales-trades-wants.18/index.rss" failed (2: No such file or directory), client: 74.125.19.145, server: thecpforum.com, request: "GET /for$
    2015/02/03 05:31:23 [error] 24186#0: *158 "/home/nginx/domains/thecpforum.com/public/login/index.php" is not found (2: No such file or directory), client: 123.138.19.140, server: thecpforum.com, request: "GET /login/ HTTP/1.1", host: "w$
    2015/02/03 05:31:27 [error] 24186#0: *161 "/home/nginx/domains/thecpforum.com/public/login/index.php" is not found (2: No such file or directory), client: 123.138.19.140, server: thecpforum.com, request: "GET /login/ HTTP/1.1", host: "w$
    2015/02/03 05:47:56 [error] 24186#0: *166 open() "/home/nginx/domains/thecpforum.com/public/thecpforum2.png" failed (2: No such file or directory), client: 207.161.80.106, server: thecpforum.com, request: "GET /thecpforum2.png HTTP/1.1"$
    2015/02/03 05:47:56 [error] 24186#0: *166 open() "/home/nginx/domains/thecpforum.com/public/thecpforum2.png" failed (2: No such file or directory), client: 207.161.80.106, server: thecpforum.com, request: "GET /thecpforum2.png HTTP/1.1"$
    2015/02/03 05:51:45 [error] 24186#0: *174 open() "/home/nginx/domains/thecpforum.com/public/threads/what-is-in-your-mix.1745/page-2" failed (2: No such file or directory), client: 66.249.79.61, server: thecpforum.com, request: "GET /thr$
    2015/02/03 05:51:46 [error] 24186#0: *175 "/home/nginx/domains/thecpforum.com/public/topic/2242-nepenthes-june/index.php" is not found (2: No such file or directory), client: 62.210.141.227, server: thecpforum.com, request: "GET /topic/$
    2015/02/03 05:53:55 [error] 24186#0: *180 "/home/nginx/domains/thecpforum.com/public/attachments/p1190712-jpg.1401/index.php" is not found (2: No such file or directory), client: 66.249.79.53, server: thecpforum.com, request: "GET /atta$
    2015/02/03 05:55:31 [error] 24186#0: *181 "/home/nginx/domains/thecpforum.com/public/threads/sarracenia-sale.3034/index.php" is not found (2: No such file or directory), client: 207.46.13.52, server: thecpforum.com, request: "GET /threa$
    2015/02/03 05:56:03 [error] 24186#0: *182 "/home/nginx/domains/thecpforum.com/public/recent-activity/donations/index.php" is not found (2: No such file or directory), client: 157.55.39.25, server: thecpforum.com, request: "GET /recent-a$
    2015/02/03 05:56:47 [error] 24186#0: *183 open() "/home/nginx/domains/thecpforum.com/public/threads/enter-a-chance-to-win-a-drosera-capensis-d-capensis-cape-sundew-red-leaf.1611/page-2" failed (2: No such file or directory), client: 66.$
    2015/02/03 05:56:48 [error] 24186#0: *183 "/home/nginx/domains/thecpforum.com/public/attachments/uploadfromtaptalk1350708181154-jpg.50/index.php" is not found (2: No such file or directory), client: 66.249.79.45, server: thecpforum.com,$
    2015/02/03 06:00:21 [error] 24186#0: *186 "/home/nginx/domains/thecpforum.com/public/attachments/uploadfromtaptalk1350680228788-jpg.44/index.php" is not found (2: No such file or directory), client: 66.249.79.45, server: thecpforum.com,$
    2015/02/03 06:01:41 [error] 24186#0: *189 open() "/home/nginx/domains/thecpforum.com/public/threads/hello-from-the-philippines.1942/page-2" failed (2: No such file or directory), client: 66.249.79.45, server: thecpforum.com, request: "G$
    2015/02/03 06:03:00 [error] 24186#0: *190 "/home/nginx/domains/thecpforum.com/public/attachments/uploadfromtaptalk1350680211661-jpg.43/index.php" is not found (2: No such file or directory), client: 66.249.79.45, server: thecpforum.com,$
    2015/02/03 06:04:09 [error] 24186#0: *191 "/home/nginx/domains/thecpforum.com/public/forums/rss/ccs/1c1-articles/index.php" is not found (2: No such file or directory), client: 128.242.249.12, server: thecpforum.com, request: "GET /foru$
    2015/02/03 06:06:41 [error] 24186#0: *192 open() "/home/nginx/domains/thecpforum.com/public/threads/christian-jamess-photos.2184/page-2" failed (2: No such file or directory), client: 66.249.79.61, server: thecpforum.com, request: "GET $
    2015/02/03 06:06:42 [error] 24186#0: *193 open() "/home/nginx/domains/thecpforum.com/public/find-new/10863/profile-posts" failed (2: No such file or directory), client: 66.249.79.53, server: thecpforum.com, request: "GET /find-new/10863$
    2015/02/03 06:07:25 [error] 24186#0: *194 open() "/home/nginx/domains/thecpforum.com/public/find-new/10943/media" failed (2: No such file or directory), client: 66.249.79.45, server: thecpforum.com, request: "GET /find-new/10943/media?p$
    2015/02/03 06:07:29 [error] 24186#0: *195 open() "/home/nginx/domains/thecpforum.com/public/forums/peppers.89/index.rss" failed (2: No such file or directory), client: 207.46.13.52, server: thecpforum.com, request: "GET /forums/peppers.$
    2015/02/03 06:08:20 [error] 24186#0: *196 "/home/nginx/domains/thecpforum.com/public/media/index.php" is not found (2: No such file or directory), client: 157.55.39.25, server: thecpforum.com, request: "GET /media/ HTTP/1.1", host: "www$
    2015/02/03 06:13:39 [error] 24186#0: *199 "/home/nginx/domains/thecpforum.com/public/threads/dews-for-sale.3124/index.php" is not found (2: No such file or directory), client: 66.249.79.53, server: thecpforum.com, request: "GET /threads$
    2015/02/03 06:15:43 [error] 24186#0: *200 "/home/nginx/domains/thecpforum.com/public/topic/2206-n-tenuis-x-x-predator/index.php" is not found (2: No such file or directory), client: 5.157.51.61, server: thecpforum.com, request: "GET /to$
    2015/02/03 06:16:12 [error] 24186#0: *202 "/home/nginx/domains/thecpforum.com/public/search/index.php" is not found (2: No such file or directory), client: 157.55.39.45, server: thecpforum.com, request: "GET /search/?type=post HTTP/1.1"$
    2015/02/03 06:16:42 [error] 24186#0: *203 open() "/home/nginx/domains/thecpforum.com/public/threads/n-truncata-x-x-trusmadiensis.149/page-2" failed (2: No such file or directory), client: 66.249.79.53, server: thecpforum.com, request: "$
    2015/02/03 06:16:53 [error] 24186#0: *204 open() "/home/nginx/domains/thecpforum.com/public/register" failed (2: No such file or directory), client: 183.8.97.235, server: thecpforum.com, request: "GET /register HTTP/1.1", host: "www.the$
    2015/02/03 06:18:29 [error] 24186#0: *206 "/home/nginx/domains/thecpforum.com/public/forums/american-pitchers-sarracenia-and-darlingtonia.15/index.php" is not found (2: No such file or directory), client: 157.55.39.45, server: thecpforu$
    2015/02/03 06:21:41 [error] 24186#0: *207 open() "/home/nginx/domains/thecpforum.com/public/threads/happy-new-years-thecpforum.1722/page-2" failed (2: No such file or directory), client: 66.249.79.45, server: thecpforum.com, request: "G$
    2015/02/03 06:22:31 [error] 24186#0: *208 "/home/nginx/domains/thecpforum.com/public/members/melium.3/index.php" is not found (2: No such file or directory), client: 207.46.13.52, server: thecpforum.com, request: "GET /members/melium.3/$
    2015/02/03 06:22:52 [error] 24186#0: *209 open() "/home/nginx/domains/thecpforum.com/public/help/cookies" failed (2: No such file or directory), client: 192.210.144.50, server: thecpforum.com, request: "GET /help/cookies HTTP/1.0", host$
    2015/02/03 06:24:09 [error] 24186#0: *212 "/home/nginx/domains/thecpforum.com/public/login/index.php" is not found (2: No such file or directory), client: 212.83.144.238, server: thecpforum.com, request: "GET /login/ HTTP/1.1", host: "w$
    2015/02/03 06:24:10 [error] 24186#0: *214 "/home/nginx/domains/thecpforum.com/public/login/index.php" is not found (2: No such file or directory), client: 31.187.76.106, server: thecpforum.com, request: "GET /login/ HTTP/1.0", host: "ww$
    2015/02/03 06:25:17 [error] 24186#0: *217 "/home/nginx/domains/thecpforum.com/public/members/monkey.411/index.php" is not found (2: No such file or directory), client: 157.55.39.25, server: thecpforum.com, request: "GET /members/monkey.$
    2015/02/03 06:25:50 [error] 24186#0: *218 "/home/nginx/domains/thecpforum.com/public/feedback/index.php" is not found (2: No such file or directory), client: 46.102.99.172, server: thecpforum.com, request: "GET /feedback/?st=20/RK=0/RS=$
    2015/02/03 06:27:22 [error] 24186#0: *220 "/home/nginx/domains/thecpforum.com/public/media/burmannii-red-giants.518/index.php" is not found (2: No such file or directory), client: 157.55.39.25, server: thecpforum.com, request: "GET /med$
    2015/02/03 06:32:03 [error] 24186#0: *223 "/home/nginx/domains/thecpforum.com/public/posts/24525/index.php" is not found (2: No such file or directory), client: 207.46.13.52, server: thecpforum.com, request: "GET /posts/24525/ HTTP/1.1"$
    2015/02/03 06:32:48 [error] 24186#0: *224 "/home/nginx/domains/thecpforum.com/public/threads/dews-for-sale.3124/index.php" is not found (2: No such file or directory), client: 157.55.39.24, server: thecpforum.com, request: "GET /threads$
    2015/02/03 06:33:22 [error] 24186#0: *225 open() "/home/nginx/domains/thecpforum.com/public/find-new/10039/media" failed (2: No such file or directory), client: 66.249.79.53, server: thecpforum.com, request: "GET /find-new/10039/media?p$
    2015/02/03 06:36:47 [error] 24186#0: *226 "/home/nginx/domains/thecpforum.com/public/topic/2906-my-new-additions/index.php" is not found (2: No such file or directory), client: 23.94.36.173, server: thecpforum.com, request: "GET /topic/$
    2015/02/03 06:36:56 [error] 24186#0: *228 "/home/nginx/domains/thecpforum.com/public/media/p3270108.515/index.php" is not found (2: No such file or directory), client: 207.46.13.52, server: thecpforum.com, request: "GET /media/p3270108.$
    2015/02/03 06:39:10 [error] 24186#0: *229 open() "/home/nginx/domains/thecpforum.com/public/register" failed (2: No such file or directory), client: 113.134.12.191, server: thecpforum.com, request: "GET /register HTTP/1.1", host: "www.t$
    2015/02/03 06:39:40 [error] 24186#0: *231 "/home/nginx/domains/thecpforum.com/public/forums/rss/ccs/1c1-articles/index.php" is not found (2: No such file or directory), client: 128.242.249.11, server: thecpforum.com, request: "GET /foru$
    2015/02/03 06:39:59 [error] 24186#0: *234 "/home/nginx/domains/thecpforum.com/public/profile-posts/1094/index.php" is not found (2: No such file or directory), client: 66.249.79.61, server: thecpforum.com, request: "GET /profile-posts/1$
    2015/02/03 06:42:57 [error] 24186#0: *236 open() "/home/nginx/domains/thecpforum.com/public/thecpforum2.png" failed (2: No such file or directory), client: 67.110.212.16, server: thecpforum.com, request: "GET /thecpforum2.png HTTP/1.1",$
    2015/02/03 06:43:03 [error] 24186#0: *236 open() "/home/nginx/domains/thecpforum.com/public/thecpforum2.png" failed (2: No such file or directory), client: 67.110.212.16, server: thecpforum.com, request: "GET /thecpforum2.png HTTP/1.1",$
    2015/02/03 06:43:08 [error] 24186#0: *237 "/home/nginx/domains/thecpforum.com/public/media/users/sukhoidave.429/index.php" is not found (2: No such file or directory), client: 157.55.39.63, server: thecpforum.com, request: "GET /media/u$
    2015/02/03 06:44:23 [error] 24186#0: *238 "/home/nginx/domains/thecpforum.com/public/profile-posts/1230/index.php" is not found (2: No such file or directory), client: 157.55.39.25, server: thecpforum.com, request: "GET /profile-posts/1$
    2015/02/03 06:49:06 [error] 24186#0: *240 "/home/nginx/domains/thecpforum.com/public/forum/9-propagation/index.php" is not found (2: No such file or directory), client: 192.171.235.107, server: thecpforum.com, request: "GET /forum/9-pro$
    2015/02/03 06:49:33 [error] 24186#0: *242 open() "/home/nginx/domains/thecpforum.com/public/media/n-hamata.579/full" failed (2: No such file or directory), client: 157.55.39.24, server: thecpforum.com, request: "GET /media/n-hamata.579/$
    2015/02/03 06:59:19 [error] 24186#0: *245 open() "/home/nginx/domains/thecpforum.com/public/find-new/10916/media" failed (2: No such file or directory), client: 66.249.79.53, server: thecpforum.com, request: "GET /find-new/10916/media?p$
    2015/02/03 07:03:04 [error] 24186#0: *247 "/home/nginx/domains/thecpforum.com/public/topic/2533-should-i-cut-it/index.php" is not found (2: No such file or directory), client: 68.180.228.180, server: thecpforum.com, request: "GET /topic$
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah problem is Nginx vhost isn't configured correctly for Xenforo as outlined here
     
  12. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    #            listen   80;
    #            server_name thecpforum.com;
    #            return 301 $scheme://www.thecpforum.com$request_uri;
    #       }
    
    server {
      server_name thecpforum.com www.thecpforum.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/thecpforum.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/thecpforum.com/log/error.log;
    
      root /home/nginx/domains/thecpforum.com/public;
    
       location /forums/ {
                index index.php index.html index.htm;
                try_files $uri $uri/ /forums/index.php?$uri&$args;
    
            }
    
            location /forums/internal_data/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
            location /forums/library/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
            }
    
    Thanks for the help! Does this look correct? It appears to download a file?
     
  13. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    #            listen   80;
    #            server_name thecpforum.com;
    #            return 301 $scheme://www.thecpforum.com$request_uri;
    #       }
    
    server {
      server_name thecpforum.com www.thecpforum.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/thecpforum.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/thecpforum.com/log/error.log;
    
      root /home/nginx/domains/thecpforum.com/public;
    
       location / {
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php?$uri&$args;
            
            }
            location /internal_data/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
            location /library/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
            }
    
    Thats how it should appear since there is not a main /forum directory. But I still get a weird download file..
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    missing the include files for php which will cause php prompts to download .php files

    but close

    should be like

    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    #            listen   80;
    #            server_name thecpforum.com;
    #            return 301 $scheme://www.thecpforum.com$request_uri;
    #       }
    
    server {
      server_name thecpforum.com www.thecpforum.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/thecpforum.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/thecpforum.com/log/error.log;
    
      root /home/nginx/domains/thecpforum.com/public;
    
       location /forums/ {
                index index.php index.html index.htm;
                try_files $uri $uri/ /forums/index.php?$uri&$args;
    
            }
    
            location /forums/internal_data/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
            location /forums/library/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
     
  15. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    #            listen   80;
    #            server_name thecpforum.com;
    #            return 301 $scheme://www.thecpforum.com$request_uri;
    #       }
    
    server {
      server_name thecpforum.com www.thecpforum.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/thecpforum.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/thecpforum.com/log/error.log;
    
      root /home/nginx/domains/thecpforum.com/public;
    
       location / {
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php?$uri&$args;
    
            }
    
            location /internal_data/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
            location /library/ {
            internal;
            allow 127.0.0.1;
            deny all;
            }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    This is what I have, but it still prompts download.
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    after making changes to nginx vhost you need to restart nginx server too :)
     
  17. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    I did restart the nginx server
     
  18. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Are you running live on thecpforum.com as i do not see any download prompts ?
     
  19. Jake

    Jake Member

    76
    10
    8
    Feb 3, 2015
    Ratings:
    +11
    Local Time:
    2:03 PM
    NA
    Maria DB 5.5
    Its because its still cached! Wow I just tested it and that worked. Can I donate to you via paypal?
     
  20. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    2:03 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Glad to hear it worked :)

    Donations aren't accepted but Premium Membership is on offer - quite a few Premium member perks available :D