Welcome! Log In Create A New Profile

Advanced

Nginx installation even good...?

Posted by Lars 
Nginx installation even good...?
March 04, 2011 11:03AM
I'm trying to migrate one of my servers from Apache to Nginx, but my Nginx installation seems to be showing some weird behavior.

I can start it, then immediately restart it just fine, but if I start it, let it serve out any pages and then try to restart it I get this:

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

Then I need to use a force-reload....

Has anyone ever seen this before?
Re: Nginx installation even good...?
March 28, 2011 09:11PM
I got the exact same thing and I am try to do the same... Move away from Apache and migrate to Nginx

I'm using Debian 6 (Squeeze)

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
Re: Nginx installation even good...?
March 29, 2011 08:47AM
[QUOTE]Are you sure your HDD have enough free space ,
---------
failed (28: No space left on device)
------------
Check the HDD space and inode usage

df -h
df -ih[/QUOTE]

df -h

[code]File System Size Used Avail Use Mount On
/dev/vzfs 25G 1.6G 24G 7% /[/code]

df -ih

[code]File System Inodes IUsed Ifree IUse% Mount On
/dev/vzfs 489K 59K 413K 12% / [/code]
Re: Nginx installation even good...?
March 29, 2011 09:02AM
[quote]
it's telling you you're out of shared memory.

It's trying to allocate 32MB of shared memory, and you don't have that much available.

However you boost your shared memory in deb, you need to do that.
[/quote]

Assume I'm a windows user (cause typically I am). Can you please explain the best way to do that?
Re: Nginx installation even good...?
March 29, 2011 09:18AM
[quote]as root,

edit /etc/sysctl.conf by adding following line at the end of the file:

kernel.shmmax = 268435456

reboot.

Should be good to go.
[/QUOTE]

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?
Re: Nginx installation even good...?
March 29, 2011 09:24AM
[quote]You should try removing Apache2 now, to avoid any conflicts[/quote]

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?
Re: Nginx installation even good...?
March 29, 2011 09:29AM
[quote]What was the original path?[/quote]

/var/www/virtual/sociallyuncensored.eu/htdocs
Re: Nginx installation even good...?
March 29, 2011 09:43AM
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)
Re: Nginx installation even good...?
March 29, 2011 10:10AM
[quote]You do not have to relocate your files. Simply edit
/etc/nginx/sites-available/default

This should make things easier
[/quote]

Done and I can see my "static" html pages, but it seems to want to download my .php files, rather then load them.
Re: Nginx installation even good...?
March 29, 2011 10:35AM
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
Re: Nginx installation even good...?
March 29, 2011 10:46AM
TheVisitors Wrote:
-------------------------------------------------------
> 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


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.
Re: Nginx installation even good...?
March 29, 2011 05:19PM
[quote]
With all the problems you've had, is there a reason you are trying to switch to Nginx?
[/quote]

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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready