Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

wordpress updates

  • Loading branch information...
commit 1ee19f4051d65df795d1eddcbeb7b5a1538aa119 1 parent e6c5d5e
@davidebettio authored
Showing with 128 additions and 2 deletions.
  1. +7 −2 README.md
  2. +23 −0 fastcgi.conf
  3. +98 −0 nginx.conf
View
9 README.md
@@ -73,8 +73,8 @@ database and users
-------------
mysql -u root -p
create database votoitalia
- CREATE USER 'votoitalia'@'localhost' IDENTIFIED BY '123456';
- GRANT ALL PRIVILEGES ON votoitalia.* TO 'votoitalia'@'localhost' WITH GRANT OPTION;
+ CREATE USER 'user1'@'localhost' IDENTIFIED BY '123456';
+ GRANT ALL PRIVILEGES ON db1.* TO 'user1'@'localhost' WITH GRANT OPTION;
nodejs
-------------
@@ -82,3 +82,8 @@ nodejs
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
+
+change php-fpm user for Wordpress automatic update
+-------------
+ user = ubuntu
+ group = ubuntu
View
23 fastcgi.conf
@@ -0,0 +1,23 @@
+fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+fastcgi_param QUERY_STRING $query_string;
+fastcgi_param REQUEST_METHOD $request_method;
+fastcgi_param CONTENT_TYPE $content_type;
+fastcgi_param CONTENT_LENGTH $content_length;
+
+fastcgi_param SCRIPT_NAME $fastcgi_script_name;
+fastcgi_param REQUEST_URI $request_uri;
+fastcgi_param DOCUMENT_URI $document_uri;
+fastcgi_param DOCUMENT_ROOT $document_root;
+fastcgi_param SERVER_PROTOCOL $server_protocol;
+
+fastcgi_param GATEWAY_INTERFACE CGI/1.1;
+fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
+
+fastcgi_param REMOTE_ADDR $remote_addr;
+fastcgi_param REMOTE_PORT $remote_port;
+fastcgi_param SERVER_ADDR $server_addr;
+fastcgi_param SERVER_PORT $server_port;
+fastcgi_param SERVER_NAME $server_name;
+
+# PHP only, required if PHP was built with --enable-force-cgi-redirect
+fastcgi_param REDIRECT_STATUS 200;
View
98 nginx.conf
@@ -0,0 +1,98 @@
+#user nobody;
+worker_processes 1;
+
+# [ debug | info | notice | warn | error | crit ]
+error_log logs/error.log debug;
+#error_log logs/error.log notice;
+#error_log logs/error.log info;
+
+#pid logs/nginx.pid;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ # Ruby 1.9.3 !problems!
+ #passenger_root /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12;
+ #passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby;
+
+ # Ruby 1.9.2
+ passenger_root /usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.12;
+ passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p320/ruby;
+
+ include mime.types;
+ default_type application/octet-stream;
+
+ #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ # '$status $body_bytes_sent "$http_referer" '
+ # '"$http_user_agent" "$http_x_forwarded_for"';
+
+ #access_log logs/access.log main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ #keepalive_timeout 0;
+ keepalive_timeout 65;
+
+ #gzip on;
+
+ upstream php {
+ server unix:/var/run/php-fpm/php-fpm.sock;
+ #server 127.0.0.1:9000;
+ }
+
+ # Rails test configuration
+ server {
+ listen 0.0.0.0:80;
+ server_name railsdomain.com;
+ root /home/ubuntu/railsdomain/public;
+
+ access_log logs/railsdomain_access.log;
+ error_log logs/railsdomain_error.log;
+
+ passenger_enabled on;
+ rails_env development;
+ }
+
+ # Php/Wordpress test configuration
+ server {
+ listen 0.0.0.0:80;
+ server_name phpdomain.com;
+
+ access_log logs/phpdomain_access.log;
+ error_log logs/phpdomain_error.log;
+
+ root /home/ubuntu/phpdomain;
+ index index.php;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ location = /robots.txt {
+ allow all;
+ log_not_found off;
+ access_log off;
+ }
+
+ location / {
+ # This is cool because no php is touched for static content
+ try_files $uri $uri/ /index.php;
+ }
+
+ location ~ \.php$ {
+ #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
+ include fastcgi.conf;
+ fastcgi_intercept_errors on;
+ fastcgi_pass php;
+ }
+
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
+ expires max;
+ log_not_found off;
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.