Free VPS Discussion
Nginx problems - Printable Version

+- Free VPS Discussion (//freevps.us)
+-- Forum: Free VPS Discussion (/forum-1.html)
+--- Forum: Help & Support (/forum-2.html)
+--- Thread: Nginx problems (/thread-4716.html)

Pages: 1 2 3


Nginx problems - cwilkinson1998 - 04-22-2012 10:31 PM

I'm trying to install worpress on my site, using this tutorial : http://tech.mobiletod.com/how-to-install-lamp-serverapache-mysql-php-on-ubuntu-10-10/

But when it installs and is running there isn't enough RAM to installl wordpress without it failing. So I tried the thread on this forum at http://freevps.us/thread-1434.html

When it installs and I load the IP for the VPS, I get a 403 : Forbidden Error.

I have uploaded and extracted the Wordpress files but they won't load, am I putting them in the right directory. I'm putting them in /var/www is this right?


RE: Nginx problems - Nevil - 04-22-2012 11:01 PM

The "403 - Forbidden" error means that indexing without any files (without files like index.html, index.php and so on that display the sites Index) on the server is not allowed which seems to be default on Nginx. On Apache this can be disabled and you will simply see the servers direction template without any files instead of a 403 error. A 200 OK is sent when everything is alright.

The files go to /var/www/html Smile


RE: Nginx problems - Matthew425 - 04-22-2012 11:16 PM

Try adding a index.php to the wordpress directory and put this in index.php:
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>


RE: Nginx problems - Nevil - 04-22-2012 11:22 PM

The above methode is totally useless as the index.php of Wordpress already contains this code.

The only solution is to move the files from /var/www to /var/www/html as Dmms script is configurated to use /var/www/html as the root path for files (this can be changed in the Nginx config file).


RE: Nginx problems - aatish910 - 04-23-2012 12:17 AM

Modify line "listen 80;" into "listen 80 default_server;" to your server configuration block. You are getting this error because there is no default virtual host for Nginx to fall into. Or, it could be directory listing problem if Dmm's script creates a default server block.


RE: Nginx problems - cwilkinson1998 - 04-23-2012 01:41 AM

(04-23-2012 12:17 AM)aatish910 Wrote:  if Dmm's script creates a default server block.

There is no server block in the file at /etc/nginx/nginx.conf
Should I just add it?
What do you have to include or can I have an example of one that would work on these VPSs


RE: Nginx problems - Nevil - 04-23-2012 01:45 AM

Sorry, have you moved the files into /var/www/html?

I'm sure this is the only thing you need to do Smile.

My nginx.conf:
Code:
user              nginx nginx;
worker_processes  1;


pid               /var/run/nginx.pid;

events {
    worker_connections  2048;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    client_max_body_size 64M;
    sendfile        on;
    tcp_nopush      on;

    keepalive_timeout  3;

    gzip  on;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types      text/plain text/css application/x-javascript text/xml appli$

    server_tokens off;

    include /etc/nginx/conf.d/*;

As you see there is nothing inside of what aatish910 has mentioned.


RE: Nginx problems - aatish910 - 04-23-2012 01:48 AM

Have you created a vhost using setup-vhost? Look at /etc/nginx/conf.d/mydomain.conf . If you havent created a vhost, then create it using
Code:
setup-vhost mydomain
and add what I said to it's config file.


RE: Nginx problems - Nevil - 04-23-2012 01:50 AM

He doesn't need a vhost, (mydomain.conf does not exist as I did not setup a vhost) and my site is working very well as you can see on serialthrilla.us.to.


RE: Nginx problems - cwilkinson1998 - 04-23-2012 01:53 AM

I got the site working! Thanks everyone, I moved the files to /var/www/html

Also, can I ask, what is the default database username and password?
I need this to complete the installation.

I think the database is called mysql and the user name, 'root'? but what's the password?