Troubling with wordbress nginx on ubuntu - wordpress

I installed nginx, php5, and wordpress on ubuntu 12.04 (as well as other services).
I followed step by step digitalocean's tutorial, somewhere in the middle of the process i realised i want to switch from root user to 'foo' user and i chown-ed all relevant files and directories.
I finished the tutorials and straggling for many hours trying to figure why i get 403 forbidden error.
i launch the service with foo user using sudo.
all the workers are running under foo apart from the master which is running from root.
Update:
It seems i have a problem with the landing page which doesn't recognise it should look for index.php, when i type xxx.xxx.xxx.xxx/index.php (as full path to the php file) i get this error:
The page you are looking for is temporarily unavailable.
Please try again later.
This error pops only on php files, on regular html / txt it works fine.
any suggestions why:
default landing is not directed to index.php
can not open php files
Update:
So apparently the tutorial in digitalocean had a minor misleading line, i solved the 2nd problem with this nice article: http://www.queryadmin.com/921/connect-unix-var-run-php5-fpm-sock-failed/

for some reason a few lines in the vhost file were commented out. rest of issues were solved as described above updates

Related

Error when launching RespondCMS

I recently made a fresh install of Debian 8 + Apache + MySql on a VPS to host RespondCMS.
The installation went well but when I launch the application in a browser, a part of the layout is broken and the themes are not listed.
Layout is broken
When I open the debug console in Chrome, I can see that's it's linked to an error loading a resource (api/theme).
api/theme error
Did I forget something or is it a bug in the app ?
I came across a post mentioning a page at test/index.php which lists all the requirements of the app that are not matched.
Fixing them one by one, I finally fixed my original issue when enabling mod_rewrite module of Apache and adding a "Directory" tag in the .conf file of the website (AllowOverride None).
Hope it will help ;)

Koken & Chrome: INCOMPLETE_CHUNKED_ENCODING

Some albums do not load using koken and I get this error INCOMPLETE_CHUNKED_ENCODING on Chrome. I'm using nginx 1.6.2, CentOS 7, Koken 0.22.4. I'm using graphicsMagick 1.3.23, ImageMagick 6.9.2, PHP 5.6.21 and MySQL 5.1.73.
Related issue
After checking some related issues about INCOMPLETE_CHUNKED_ENCODING like:
This on the apache help blog
Another one here
And finally this one
I solved it by changing the permissions on my /opt/nginx directory to the nginx user. It may be related with the last referenced post.
when you give a response too big for Nginx, it uses this directory to
write as a working directory for temporary files. If the worker
process cannot access it, Nginx will terminate the transmission before
it completes, thus the error INCOMPLETE_CHUNKED_ENCODING.

Drupal - White Screen of Death after updates (and login page returning 403 error)

I have just updated a site that is using Drupal and have now experienced the horrible WSOD.
I have searched through Google looking for any sort of solution/error log to help me find and fix the issue but nothing has worked. I have tried adding in the 'display errors' code in the index.php file and looked at the error_log file in the public directory and nothing.
I can not login to the admin page and check any modules as the login page for this is returning a 403 error.
Any suggestions?
Please go to Apache Error log. You will exact error messages there.
The log file's location is different for different OS and versions.
e.g httpd/log/error.log
Maybe your Drupal registry is broken.
Fix this using the registry_rebuild script (this is no module!)
There are times in Drupal 7 when the registry gets hopelessly hosed and you need to rebuild the registry (a list of PHP classes and the files they go with). Sometimes, though, you can't do this regular cache-clear activity because some class is required when the system is trying to bootstrap.
You might get something like:
PHP Fatal error: Class 'EntityAPIControllerExportable' not found in ...sites/all/modules/rules/includes/rules.core.inc on line 11
If this happens when you're trying to run update.php, and happens when you're trying to clear your cache, well, you have some trouble. That's what Registry Rebuild is for.
It also may happen that you've moved some module that Drupal requires to bootstrap, and you get a horrible error. Registry Rebuild will also rebuild the system table to get the modules in the right place so you can bootstrap.
You will need PHP-CLI or drush to run this.
https://drupal.org/project/registry_rebuild

XAMPP wordpress on localhost

I have this site and I need to test it out locally to see if there is an issue with my php settings, anyways I tried to navigate to localhost with the port number localhost:portnumber
and that worked fine, but then I tried to navigate to my site localhost:portnumber/mysite and I get a 404 error and the in the the address i navigate to changes to localhost:portnumber/mysite
Why is this happening and what can I do to fix it?
Thanks
Because you are getting a 404 error, your server seems to be running but make sure the server is the one you have setup.
1st, have you tried using a simple html file? example: blabla.html on root, and typing: localhost:portnumber/blabla.html
If this is working, that means your server is running fine, you can also try with an Hello world php file if you wish.
In the case of wordpress, there is sometime a .htaccess file that uses url rewrite and it may remove your port number, you could try to test with a clean wordpress install first.

Wordpress Blog :: 500 Internal Server Error

I am getting this error message while trying to access a wordpress blog which is installed in a directory. Is this due to .htaccess or something? Any help is appreciated.
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#xxxxx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at xxxx.com Port 80'
This is almost always a problem with your Apache configuration. Errors originating in PHP won’t trigger the Apache 5xx handler, which is what you’re seeing.
Unfortunately, without more information, your problem is impossible to diagnose. I’d recommend that you:
Check the logs. First thing! It should give you a better idea where your problem is.
Stop and restart Apache. If there is a problem with permissions on something Apache needs write access to (logs), it could completely fail to start. This should give you the proper motivation to fix the problem, particularly if there are other VirtualHosts on that Apache.
Move your .htaccess file(s) somewhere else. If Apache works, you know it’s a problem with that file.
It sounds like you're getting some sort of PHP error but PHP isn't set to display errors. You'll want to check your Apache logs for detailed error info.
The mostly likely culprit is that you're missing some prerequisite for running WordPress, although all you should really need is Apache, MySQL, & mod_rewrite.
I was able to fix it by adding the following line to my .htaccess file:
php_value memory_limit 128M
Russ
This is happening to me RIGHT NOW.
As to from what I know, my hosting providers did a DNS change and so I'm waiting for the DNS to propagate, it's been like three hours and still zero.
Blog is showing ok, apache is up and working, I just can't get access into the WP Admin area.
If it does get fixed by tomorrow, I'll reply here so it can be of help for others.
Edit: I just fixed my problem.
In my case it was determined that the Fast Contact Form plug-in was creating the problem. I modified the folder name from si-contact-form to si-contact-form-hold then I regained WP Admin access.
After that I created a php.ini file with this string inside 'memory=64MB' and saved that into the wp-admin folder.
Manually deleted the si-contact-form-hold (to avoid possible corrupted files) and reinstalled the Fast Contact Form.
All my settings were already there and everything is back up and running good!
Hope this helps.
Look at http://zemalf.com/1470/wordpress-htaccess-the-definite-guide/, and look for the paragraph which says something like "Good and default .htaccess looks like this...."
My issue was a little bit different. I had an .htaccess file inside the wp-admin directory. I deleted the .htaccess inside of wp-admin and that fixed my problems.
Unfortunately it could be anything. Do static pages on the site work properly.
Have you checked the server logs.
I think it is likely to do with php. If static pages are there then possibly your config for wordpress is incorrectly configured or files missing.
Has php be working? Did the blog work and then stop? Did you get through the install process?
Check wordpress files ownership for the user are correct or not.
In linux ls -laZ command will display the ownership.
For setting the ownership for a folder use this command
chown -R username:username /user/username/public_html/
An HTTP 500 error could be caused by a great many things. Have you changed your .htaccess file recently? If you try to use a .htaccess feature that is disabled on your host, that is one possible cause.
Some more points
Blog has been running successfully. Just observed this problem since yesterday.
Blog is in a directory so it works something like this www.xyz.com/blog. Apparently www.xyz.com is working perfectly.
Update on logs
Getting these two errors in the logs:
File does not exist: /home/directory/public_html/500.shtml
/home/sub-directory/public_html/sub-directory/.htaccess: RewriteCond: bad argument line '%{REQUEST_FILENAME}!-f'
/home/directory/public_html/sub-directory/.htaccess: # without matching # section
How do I restart apache on cpanel ?
memory = 64MB;
The above line inside a php.ini file uploaded to the wp-admin folder solved my problem. I was not being able to log into the dashboard either through /wp-admin or /wp-login.php, and was getting a HTTP server error 500.
There can be multiple causes for this, I just solved mine, after 2-3 hours of going crazy.
I had another WP instance in a subdirectory inside the main WP instance (in the root folder).
Have checked / deleted .htaccess
deleted plugin folder
In the end, it was to do with the permission of the subfolder in which second instance was running. It was originally 775 (write permission for group), I had to change it to 755 (no write permission for group) and this finally fixed it, like magic.
This is of course just one of possible the answers to your question, I wanted to write it down though as I didn't find it explicitly written anywhere so it might save others some time.

Resources