Permalinks fail - APC, NGINX, VARNISH - Digital Ocean

LPH

Well-known member
The nginx, varnish was working fine after many hours of fussing with configuration files. But I foolishly installed APC and now I'm back to square one.

The permalinks fail. The front end of the site appears to load but links to articles fail.

But hey - it fails fast :)

http://www.tuxreports.com/
http://www.tuxreports.com/community/

So - can someone suggest a file to look into to figure out why the links no longer are correct?

These were the directions I followed (absent APC) this morning and things were working (minus the varnish purge lines file)
.
http://www.cryptkcoding.com/2011/08/running-wordpress-with-nginx-php-fpm-apc-and-varnish/

Thank you for your guidance.
 
Update:

Forced uninstall of nginx.
Code:
apt-get purge nginx nginx-common nginx-full

Restarted services and the site worked with permalinks.

Tried to reinstall nginx and failed each time giving the error that the port was already in use. I've given up and removed nginx files from the server and will try another time.

If you happen to be really comfortable with nginx installation and would like to give it a go then feel free to PM.
 
I've been running into the nginx: [emerg] bind() to [::]:80 failed (98: Address already in use) error. Removed listen 80; and replaced it with listen [::]:80 ipv6only=on default_server; and the nginx will start. However, phpinfo doesn't show it.

sudo netstat -tulpn

apache 127.0.0.1:8080
varnishd 192.241.231.x:80
varnishd 127.0.0.1:6082
nginx :::80

While everything appears to be started at the command line, how do I really know this is the optimal configuration?

Using listen 80; will not allow the nginx to start and gives the bind error.

What would you suggest I do next to get an optimal configuration? Speed test sites are giving the site an "F" ... ;)
 
I
apache 127.0.0.1:8080
varnishd 192.241.231.x:80
varnishd 127.0.0.1:6082
nginx :::80
Doesn't Varnishd and nginx need to be on different ports... and why are you using Apache, Nginx and Varnishd?
 
Doesn't Varnishd and nginx need to be on different ports... and why are you using Apache, Nginx and Varnishd?

Digital Ocean support stated to follow the link given in OP. That post installs APC, nginx, varnish, and more. My server will have WordPress, XenForo, MediaWiki, and Moodle installed.
 
Digital Ocean support stated to follow the link given in OP. That post installs APC, nginx, varnish, and more. My server will have WordPress, XenForo, MediaWiki, and Moodle installed.
OK... kinda overkill on a small VPS (if that's what you are running).
Still, the matter remains - you can't be running nginx and varnishd both on port 80 on the same same server AFAIK.

Just noticed you are trying to use nginx on IPV6...
Is nginx set to bind ONLY to your IPV6 address?
 
Last edited:
OK... kinda overkill on a small VPS (if that's what you are running).
Still, the matter remains - you can't be running nginx and varnishd both on port 80 on the same same server AFAIK.

Just noticed you are trying to use nginx on IPV6...
Is nginx set to bind ONLY to your IPV6 address?

Well .. trying ... only because that is what worked (for now) ...;)

Right - they can't all be on the same port - but the article doesn't seem to straighten out which should be on which port.

What would you suggest?

apache port?
varnishd port ?
varnishd 127.0.0.1:6082
nginx port ?
 
Well .. trying ... only because that is what worked (for now) ...;)

Right - they can't all be on the same port - but the article doesn't seem to straighten out which should be on which port.

What would you suggest?

apache port?
varnishd port ?
varnishd 127.0.0.1:6082
nginx port ?
It looks like (from your original article) that they are only using nginx and varnish - only reference to Apache I saw there was for the ApacheBench test. Are you SURE that they are using Apache2 and nginx in addition to varnish?
At the very beginning of the article he refers to throwing out Apache2.
If you are hell-bent on using all three, then you might want to check out http://serverfault.com/questions/302052/varnish-nginx-apache-apc-memcached
 
It looks like (from your original article) that they are only using nginx and varnish - only reference to Apache I saw there was for the ApacheBench test. Are you SURE that they are using Apache2 and nginx in addition to varnish?
At the very beginning of the article he refers to throwing out Apache2.
If you are hell-bent on using all three, then you might want to check out http://serverfault.com/questions/302052/varnish-nginx-apache-apc-memcached

Thank you for the link. Actually, I'm not married to anything. The idea is to rebuild the network of sites (subdirectories now rather than subdomains), and want to build things so that it is scalable.

Since this is all new to me, I'm open to taking advice from anyone. I have figured out that getting permalinks under nginx is a challenge. Apache and varnish is still not tuned on this server.

So -given scalable idea - you'd recommend - ?
 
[quote="LPH, post: 606032, member: 13490"
So -given scalable idea - you'd recommend - ?[/quote]
If you are going to use all 3, then try
apache 127.0.0.1:8080
varnishd 192.241.231.x:80
varnishd 127.0.0.1:6082
nginx :::8081

and edit the config files to reflect the associated ports. Since I'm not doing any scalar setups anywhere I'd have to do some research (and I'm about to head off for a nap right now as I've been up WAY to long playing zombies on Black Ops 2 :eek:)
 
  • Like
Reactions: LPH
If you are going to use all 3, then try
apache 127.0.0.1:8080
varnishd 192.241.231.x:80
varnishd 127.0.0.1:6082
nginx :::8081

and edit the config files to reflect the associated ports. Since I'm not doing any scalar setups anywhere I'd have to do some research (and I'm about to head off for a nap right now as I've been up WAY to long playing zombies on Black Ops 2 :eek:)

Thank you for the link and the suggestions. I was up late last night, ended up with a few hours of sleep, then hours of training ... :sleep:

Now I'm back to play :ROFLMAO:

I didn't think of 8081. Let me see what happens. :whistle:
 
Last edited:
Top Bottom