Eugeny / ajenti-v

Virtual Hosting addon for Ajenti
ajenti.org/#product-ajenti-v
MIT License
225 stars 80 forks source link

Nginx wp site Error Logs #70

Closed wrrr closed 10 years ago

wrrr commented 10 years ago

This doesn't appear to affect the sites on the server.... unless I open one of the nginx error logs (from within Ajenti -V) and then it appears to flood while ajenti is tailing one of the active problem logs. I have about 20 sites on this machine.


[global] pid = /var/run/php5-fpm.pid error_log = /var/log/php5-fpm.log

[global-pool] user = www-data group = www-data listen = /var/run/php-fcgi.sock

pm = dynamic pm.start_servers = 1 pm.max_children = 5 pm.min_spare_servers = 1 pm.max_spare_servers = 5

[mydomain-php-fcgi-0] user = www-data group = www-data

listen = /var/run/php-fcgi-mydomain-php-fcgi-0.sock

pm = dynamic pm.max_children = 30 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 6

php_admin_value[open_basedir] = /srv/http/0002


PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): in /srv/http/0012/wp-includes/functions.php on line 1425


WARNING: [pool mydomain-php-fcgi-0] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 1 idle, and 4 total children [07-May-2014 13:04:49] ERROR: fork() failed: Cannot allocate memory (12)

jadsonlourenco commented 10 years ago

Try to add the temporary directory to the PHP open_basedir to /srv/http/0002:/tmp

wrrr commented 10 years ago

Do you mean just to do a mkdir: /srv/http/0002/tmp in my file structure or do you mean that I have to alter my php-fpm.conf file? I have 20 to do on this machine.

Thanks very much for your advice @jadsonlourenco - I apologize for not understanding exactly what you meant. - never had to do this before... I'm building in unmanaged (Ubuntu) space.

jadsonlourenco commented 10 years ago

No, not to create a new directory. In site settings, the "Content" tab you created an entrance for PHP, correct? Then there is a field in this entry that defines "open_basedir", set this value "/srv/http/0002:/tmp" and save it for warranty return to the main screen of the Site Manager and click "test setup" (this resets all related services and issues a warning if any error)

wrrr commented 10 years ago

I understand and yes, this was not set... I followed @Eugeny guide for WordPress set up. I have latest Ajenti -V... I do not see "test setup" in any of my screens. Thank you again.

jadsonlourenco commented 10 years ago

this guide http://support.ajenti.org/topic/353409-setting-up-a-php-website-with-ajenti-v-wordpress-example/ ?

wrrr commented 10 years ago

Yes sir.

jadsonlourenco commented 10 years ago

ok i mean you edit value here: http://awesomescreenshot.com/01a2rqhe1c with the value "/srv/http/0002:/tmp" on you case.

wrrr commented 10 years ago

Great. I will implement and make comment back a bit later.

wrrr commented 10 years ago

Excellent @jadsonlourenco - The problem logs stopped after the last one was archived. I will add this to my workflow, and I think should be added to the guide for anyone with a similar set up. Is there a guide for when a domain is to be removed? Thanks for your very accurate assessment of my situation and great assistance.

jadsonlourenco commented 10 years ago

No problem, glad to help you. Thank to @Eugeny for the great work.

A guide to remove a domain? You can add on the "domain" tab of each site so you do not need to remove a site to change a domain, or have more than one domain.

Ajenti-V is still great development, this option you had problem now was not there a month ago, so why not there is a teaching guide. But the community here is always available to help in any way.

Eugeny commented 10 years ago

I've uploaded an update to ajenti-v-php which will add :/tmp to open_basedir if there's no custom open_basedir specified.