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 06-26-2017, 07:25 AM   #1
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,011
Any Nginx / WordPress Experts here?

We're having some nasty issues on our Nignx / WordPress setup. I'm getting to a place of panic because revenue is being impacted, affiliates are really upset and started to pull traffic - it's really impacting us.

I just need someone who knows this type of setup inside and out to look at it and provide some feedback. We can then pass that on to the hosting company - maybe help that way.

Any pros that can be recommended?
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2017, 07:55 AM   #2
blackmonsters
Yo Mamma!
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 19,927
Quote:
Originally Posted by Validus View Post
We're having some nasty issues on our Nignx / WordPress setup. I'm getting to a place of panic because revenue is being impacted, affiliates are really upset and started to pull traffic - it's really impacting us.

I just need someone who knows this type of setup inside and out to look at it and provide some feedback. We can then pass that on to the hosting company - maybe help that way.

Any pros that can be recommended?
Please contact me on skype (econfirmpro) to discuss this.

Thanks
__________________
Camsoda pays :
Become a Cam Model or Sign up as a Webmaster
blackmonsters is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2017, 08:06 AM   #3
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,234
I gonna guess how you have issue with url rewrites, so yes this is hosting issue so your host should resolve it.
__________________
For GFY administration inquiries- email info at gfy.com or send PM.
For advertising inquiries - email marketing at gfy.com

Inquiries which are not related to administration or advertising on GFY wont be processed.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2017, 05:23 PM   #4
myleene
Confirmed User
 
Industry Role:
Join Date: Oct 2013
Posts: 857
I can take a look. Contact me.
myleene is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2017, 07:55 PM   #5
Brad Mitchell
Confirmed User
 
Brad Mitchell's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: Southfield, MI
Posts: 9,728
If you ever want unmanaged hosting with optional support when you need it, please consider us in the future.

https://cs.mojohost.com/cart.php?gid=23

Plans starting at $10, support starting at $29. Best of luck - if you're still in a bind tomorrow during the day EST send me an email and I'll make a tech available to you.

Cheers,

Brad
__________________
President at MojoHost | brad at mojohost dot com | Skype MojoHostBrad
69 industry awards for hosting and professional excellence since 1999
Brad Mitchell is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-27-2017, 10:55 AM   #6
Validus
Confirmed User
 
Industry Role:
Join Date: Jul 2001
Location: Calgary, Canada
Posts: 4,011
Quote:
Originally Posted by Brad Mitchell View Post
If you ever want unmanaged hosting with optional support when you need it, please consider us in the future.

https://cs.mojohost.com/cart.php?gid=23

Plans starting at $10, support starting at $29. Best of luck - if you're still in a bind tomorrow during the day EST send me an email and I'll make a tech available to you.

Cheers,

Brad
Hi Brad, pretty happy where are at right now. Just having these massive issues with Nginx now and I don't think an unmanaged solution would be a good idea


Quote:
Originally Posted by myleene View Post
I can take a look. Contact me.
Will do. Thank you!


Quote:
Originally Posted by KlenTelaris View Post
I gonna guess how you have issue with url rewrites, so yes this is hosting issue so your host should resolve it.
Maybe. It's a mess. We have a production site, say example.com and we have a test site beta.example.com. Since the change, somewhat randomly, the production site started linking to the test site. We password protected beta.example.com to ensure users don't end up in our test environment, but now real users are getting the username / password prompt.

The hosting company thought it was the W3 Total Cache plugin, so we disabled it on both sites, but still same issue.


Quote:
Originally Posted by blackmonsters View Post
Please contact me on skype (econfirmpro) to discuss this.

Thanks
Thanks! Will do.
Validus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-27-2017, 11:27 AM   #7
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,234
Quote:
Originally Posted by Validus View Post



Maybe. It's a mess. We have a production site, say example.com and we have a test site beta.example.com. Since the change, somewhat randomly, the production site started linking to the test site. We password protected beta.example.com to ensure users don't end up in our test environment, but now real users are getting the username / password prompt.
You definitely have problem with URL rewrites :D I suggest you to google for "convert apache regex to nginx" which automatically convert apache htaccess content to nginx regex. If it does not work with first converter tool , try with second. And also manually check converted content as well.
__________________
For GFY administration inquiries- email info at gfy.com or send PM.
For advertising inquiries - email marketing at gfy.com

Inquiries which are not related to administration or advertising on GFY wont be processed.
Klen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-27-2017, 11:33 AM   #8
Brad Mitchell
Confirmed User
 
Brad Mitchell's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: Southfield, MI
Posts: 9,728
If you're happy where you're at then by all means stay there. We sell mostly fully managed solutions, though are recently marketing unmanaged as well. If there is anything I can do to help, please don't hesitate to contact me if you get stuck. I would expect that this is something any managed host could help you with.

Thank you

Brad
__________________
President at MojoHost | brad at mojohost dot com | Skype MojoHostBrad
69 industry awards for hosting and professional excellence since 1999
Brad Mitchell is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-27-2017, 11:38 AM   #9
CoolMikey
Confirmed User
 
Industry Role:
Join Date: Jun 2017
Posts: 174
Are you still having issues with this?
__________________
CoolMikey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-27-2017, 05:40 PM   #10
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,494
have a peek here

https://github.com/pothi/wordpress-nginx

has multiple examples and tweaks.

catchall domains, ssl, multisite etc.

https://github.com/pothi/wordpress-n...ites-available
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


my contact: fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-28-2017, 07:17 AM   #11
Zverka
Confirmed User
 
Zverka's Avatar
 
Join Date: Jun 2005
Location: EU
Posts: 278
Quote:
Originally Posted by Validus View Post

Maybe. It's a mess. We have a production site, say example.com and we have a test site beta.example.com. Since the change, somewhat randomly, the production site started linking to the test site. We password protected beta.example.com to ensure users don't end up in our test environment, but now real users are getting the username / password prompt.

The hosting company thought it was the W3 Total Cache plugin, so we disabled it on both sites, but still same issue.
First thing before accusing ngigx rewrite rules I would first check hardcoded stage site urls, I have seen this almost everyday. Developers sometimes use absolute urls instead of relative, and those are hardcoded either in database or in php somewhere.

This what you described it looks like what I think is, hardcoded absolute urls.

2 places to check:

1) database, dump database as .sql and opens in any txt editor, try to find stage site urls, it there are beta.example.com replace it with example

2) code, search entire public_html and try to find beta.example hardcoded in php

Lastly if this what I described is true, dump those developers ...

After this check you could proceed to nginx. This is my wp nginx that works for years

server {

listen 80;
server_name example.com;

root /home/sites/example.com/public_html;
access_log /home/sites/example.com/logs/access.log;
error_log /home/sites/example.com/logs/error.log;

location / {
index index.html index.htm index.php;
include /home/sites/example.com/public_html/nginx.conf;
}

location = /xmlrpc.php {
deny all;
#access_log off; #to prevent from filling up the access log file
#error_log off; #to prevent from filling up the error log file
}

location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm-sites.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ {
expires 1y;
log_not_found off;
}

}

server {

listen 80;
server_name www.example.com;

root /home/sites/example.com/public_html;
access_log /home/sites/example.com/logs/access.log;
error_log /home/sites/example.com/logs/error.log;

location / {
index index.html index.htm index.php;
include /home/sites/example.com/public_html/nginx.conf;
}

location = /xmlrpc.php {
deny all;
#access_log off; #to prevent from filling up the access log file
#error_log off; #to prevent from filling up the error log file
}

location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm-sites.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ {
expires 1y;
log_not_found off;
}

}

make sure server paths match yours.

And this is nginx.conf for wp pretty links rewrite, notice include it above conf

location / {
index index.html index.htm index.php;
include /home/sites/example.com/public_html/nginx.conf;
}

so this is nginx.conf

rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;

#if (!-e $request_filename) {
#rewrite ^(.+)$ /index.php?q=$1 last;
#}

if (!-e $request_filename) {
rewrite . /index.php last;
}


commented part

#if (!-e $request_filename) {
#rewrite ^(.+)$ /index.php?q=$1 last;
#}

was original I found for wp but somehow this one below works better on my server.
__________________
Zverka is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-28-2017, 08:10 AM   #12
Zeiss
Confirmed User
 
Industry Role:
Join Date: May 2012
Location: With your mom
Posts: 5,189
Most probably you have the beta subdomain config wrong. If it used to work before you added it, there it is you should look.
__________________


Adult Webmasters Guides
Zeiss is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-28-2017, 09:28 AM   #13
blackmonsters
Yo Mamma!
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 19,927
Quote:
Originally Posted by Validus View Post
Hi Brad, pretty happy where are at right now. Just having these massive issues with Nginx now and I don't think an unmanaged solution would be a good idea




Will do. Thank you!




Maybe. It's a mess. We have a production site, say example.com and we have a test site beta.example.com. Since the change, somewhat randomly, the production site started linking to the test site. We password protected beta.example.com to ensure users don't end up in our test environment, but now real users are getting the username / password prompt.

The hosting company thought it was the W3 Total Cache plugin, so we disabled it on both sites, but still same issue.




Thanks! Will do.

I tried to talk to you on skype but didn't hear anything back.


Any page/post/media created on the beta site gets assigned a url in the database that
links to the beta site.


The urls are not relative urls; they are the full http links.


You can't just move the beta database to the main site without changing the urls in the database.

If the beta site used the same database as the main site to test, then anything page/post/media added on the test site will have to be changed in the database.


__________________
Camsoda pays :
Become a Cam Model or Sign up as a Webmaster
blackmonsters is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-28-2017, 01:32 PM   #14
EddyTheDog
Just Doing My Own Thing
 
EddyTheDog's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 24,767
Quote:
Originally Posted by Zverka View Post
First thing before accusing ngigx rewrite rules I would first check hardcoded stage site urls, I have seen this almost everyday. Developers sometimes use absolute urls instead of relative, and those are hardcoded either in database or in php somewhere.

This what you described it looks like what I think is, hardcoded absolute urls.

2 places to check:

1) database, dump database as .sql and opens in any txt editor, try to find stage site urls, it there are beta.example.com replace it with example

2) code, search entire public_html and try to find beta.example hardcoded in php

Lastly if this what I described is true, dump those developers ...

After this check you could proceed to nginx. This is my wp nginx that works for years

server {

listen 80;
server_name example.com;

root /home/sites/example.com/public_html;
access_log /home/sites/example.com/logs/access.log;
error_log /home/sites/example.com/logs/error.log;

location / {
index index.html index.htm index.php;
include /home/sites/example.com/public_html/nginx.conf;
}

location = /xmlrpc.php {
deny all;
#access_log off; #to prevent from filling up the access log file
#error_log off; #to prevent from filling up the error log file
}

location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm-sites.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ {
expires 1y;
log_not_found off;
}

}

server {

listen 80;
server_name www.example.com;

root /home/sites/example.com/public_html;
access_log /home/sites/example.com/logs/access.log;
error_log /home/sites/example.com/logs/error.log;

location / {
index index.html index.htm index.php;
include /home/sites/example.com/public_html/nginx.conf;
}

location = /xmlrpc.php {
deny all;
#access_log off; #to prevent from filling up the access log file
#error_log off; #to prevent from filling up the error log file
}

location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm-sites.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ {
expires 1y;
log_not_found off;
}

}

make sure server paths match yours.

And this is nginx.conf for wp pretty links rewrite, notice include it above conf

location / {
index index.html index.htm index.php;
include /home/sites/example.com/public_html/nginx.conf;
}

so this is nginx.conf

rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;

#if (!-e $request_filename) {
#rewrite ^(.+)$ /index.php?q=$1 last;
#}

if (!-e $request_filename) {
rewrite . /index.php last;
}


commented part

#if (!-e $request_filename) {
#rewrite ^(.+)$ /index.php?q=$1 last;
#}

was original I found for wp but somehow this one below works better on my server.
Sounds about right - I would try this first...
EddyTheDog 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
setup, wordpress, type, pros, inside, recommended, pass, hosting, provide, company, feedback, traffic, nignx, issues, nasty, experts, nginx, panic, pull, started, impacting, upset, revenue, impacted, affiliates



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.