Migrate away from Apache to Nginx

Discussion in 'Nginx' started by TheVisitors, Mar 28, 2011.

  1. #1
    I'm trying to migrate away from Apache to Nginx, but my Nginx installation seems to be showing some weird behavior.

    I'm using Debian 6 (Squeeze) and did the following...

    aptitude install nginx-extras

    /etc/init.d/apache2 STOP

    /etc/init.d/nginx START

    the configuration file /etc/nginx/global.conf syntax is ok
    [alert]: mmap(MAP_ANON|MAP_SHARED, 33554432) failed (28: No space left on device)
    configuration file /etc/nginx/global.conf test failed

    This also not adding to the fact that I'll need to figure out how to setup re-write rules for my community / forums.
     
    TheVisitors, Mar 28, 2011 IP
  2. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #2
    df -h

    File System    Size    Used    Avail    Use    Mount On
    /dev/vzfs      25G     1.6G    24G      7%     /
    Code (markup):
    df -ih

    File System    Inodes    IUsed    Ifree    IUse%    Mount On
    /dev/vzfs      489K      59K      413K     12%      / 
    Code (markup):
     
    TheVisitors, Mar 29, 2011 IP
  3. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    Assume I'm a windows user (cause typically I am). Can you please explain the best way to do that?
     
    TheVisitors, Mar 29, 2011 IP
  4. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #4
    This seems to have worked, but not as I expected.

    I no longer see my webpage... Rather I see a large page that reads: Welcome to Nginx

    So do I just need to move my files to a different location on the server?
     
    TheVisitors, Mar 29, 2011 IP
  5. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #5
    Done. But still see the nice little "Welcome to Nginx"

    So do I just need to relocate my files or is there something I'm missing?
     
    TheVisitors, Mar 29, 2011 IP
  6. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #6
    /var/www/virtual/sociallyuncensored.eu/htdocs
     
    TheVisitors, Mar 29, 2011 IP
  7. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #7
    So I figured out that everything was being re-directed to

    /usr/share/nginx/www

    I'm going to attempt to copy my site there (unless anyone can think of why not to)
     
    TheVisitors, Mar 29, 2011 IP
  8. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #8
    Done and I can see my "static" html pages, but it seems to want to download my .php files, rather then load them.
     
    TheVisitors, Mar 29, 2011 IP
  9. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #9
    I've installed php-fpm

    And my community loads now, but I do not think I have the re-write working correcting. Anytime I click on a link, it redirects me back to my homepage.

    If this helps any: http://www.sociallyuncensored.eu/test-php.php
     
    TheVisitors, Mar 29, 2011 IP
  10. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #10
    Turning off friendly SEO linking seems to have solved this issue for now. But I have no idea how to re-write things to allow it.
     
    TheVisitors, Mar 29, 2011 IP
  11. TheVisitors

    TheVisitors Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #11
    Improved memory load (only have 2GB ram on my VPS)... Can think of a few others, but that tops it.

    I have everything working, but I can not figure out how to setup

    1) Re-write rules for SEO friendly linking
    2) .htaccess or alternative to it
     
    TheVisitors, Mar 29, 2011 IP