1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permalinks fail - APC, NGINX, VARNISH - Digital Ocean

Discussion in 'Server Configuration and Hosting' started by LPH, Aug 7, 2013.

  1. LPH

    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 :)


    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)

    Thank you for your guidance.
  2. LPH

    LPH Well-Known Member


    Forced uninstall of nginx.
    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.
  3. LPH

    LPH Well-Known Member

    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

    varnishd 192.241.231.x:80
    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" ... ;)
  4. Tracy Perry

    Tracy Perry Well-Known Member

    Doesn't Varnishd and nginx need to be on different ports... and why are you using Apache, Nginx and Varnishd?
  5. dbembibre

    dbembibre Active Member

  6. dbembibre

    dbembibre Active Member

  7. LPH

    LPH Well-Known Member

    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.
  8. Tracy Perry

    Tracy Perry Well-Known Member

    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: Aug 7, 2013
  9. LPH

    LPH Well-Known Member

    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 ?
    nginx port ?
  10. Tracy Perry

    Tracy Perry Well-Known Member

    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
  11. LPH

    LPH Well-Known Member

    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 - ?
  12. Tracy Perry

    Tracy Perry Well-Known Member

    [quote="LPH, post: 606032, member: 13490"
    So -given scalable idea - you'd recommend - ?[/quote]
    If you are going to use all 3, then try
    varnishd 192.241.231.x:80
    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:)
    LPH likes this.
  13. Tracy Perry

    Tracy Perry Well-Known Member

    LPH likes this.
  14. LPH

    LPH Well-Known Member

    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:
  15. Floren

    Floren Well-Known Member

    Last edited: Aug 8, 2013
    dbembibre likes this.

Share This Page