summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorTemplate builder <builder@example.com>2016-05-20 01:18:45 +0300
committerTemplate builder <builder@example.com>2016-05-20 01:18:45 +0300
commitd51264c55ba73330cf129b43f635c9489fe663f9 (patch)
tree9c7f4799dfbeec578aad58daa638afdb9e5a3128 /config
Creating template
Diffstat (limited to 'config')
-rw-r--r--config/nginx.d/default.conf.erb40
-rw-r--r--config/nginx.d/export_env.erb5
-rw-r--r--config/php.d/.gitkeep0
-rw-r--r--config/php.d/extensions.ini45
4 files changed, 90 insertions, 0 deletions
diff --git a/config/nginx.d/default.conf.erb b/config/nginx.d/default.conf.erb
new file mode 100644
index 0000000..d82da13
--- /dev/null
+++ b/config/nginx.d/default.conf.erb
@@ -0,0 +1,40 @@
+server {
+ root <%= ENV['OPENSHIFT_REPO_DIR'] %>/www;
+ listen <%= ENV['OPENSHIFT_PHP_IP'] %>:<%= ENV['OPENSHIFT_PHP_PORT'] %>;
+ server_name <%= ENV['OPENSHIFT_APP_DNS'] %>;
+ index index.php index.html index.htm <%= ENV['NGINX_EXTRA_INDEX'] %>;
+
+ set_real_ip_from <%= ENV['OPENSHIFT_PHP_IP'] %>;
+ real_ip_header X-Forwarded-For;
+
+ # avoid caching by proxies
+ add_header Cache-Control private;
+
+ location ~ \.php$ {
+ try_files $uri =404;
+ fastcgi_pass unix:<%= ENV['OPENSHIFT_PHP_DIR'] %>/run/php-fpm.sock;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ include openshift_params;
+
+ # uncomment to export all environment variables to fastcgi
+ #include <%= ENV['OPENSHIFT_REPO_DIR'] %>/config/nginx.d/export_env;
+ }
+
+ # avoid unnecessary log
+ location = /favicon.ico {
+ access_log off;
+ log_not_found off;
+ }
+
+ location = /robots.txt {
+ access_log off;
+ log_not_found off;
+ }
+
+ # Handle any other URI
+ location / {
+ try_files $uri $uri/ =404;
+ }
+}
diff --git a/config/nginx.d/export_env.erb b/config/nginx.d/export_env.erb
new file mode 100644
index 0000000..4e5db9a
--- /dev/null
+++ b/config/nginx.d/export_env.erb
@@ -0,0 +1,5 @@
+<%
+ENV.each do |name, value|
+ puts "fastcgi_param #{name} '#{value}';" unless name.start_with?("OPENSHIFT_");
+end
+%> \ No newline at end of file
diff --git a/config/php.d/.gitkeep b/config/php.d/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/php.d/.gitkeep
diff --git a/config/php.d/extensions.ini b/config/php.d/extensions.ini
new file mode 100644
index 0000000..0379fe6
--- /dev/null
+++ b/config/php.d/extensions.ini
@@ -0,0 +1,45 @@
+extension=apcu.so
+extension=bcmath.so
+extension=bz2.so
+extension=calendar.so
+extension=ctype.so
+extension=curl.so
+extension=dom.so
+extension=exif.so
+extension=fileinfo.so
+extension=ftp.so
+extension=gd.so
+extension=gettext.so
+extension=gmp.so
+extension=iconv.so
+extension=imagick.so
+extension=imap.so
+extension=intl.so
+extension=json.so
+extension=mbstring.so
+extension=mcrypt.so
+extension=mysqli.so
+extension=pdo.so
+extension=pdo_mysql.so
+extension=pdo_pgsql.so
+extension=pdo_sqlite.so
+extension=pgsql.so
+extension=phar.so
+extension=posix.so
+extension=shmop.so
+extension=simplexml.so
+extension=soap.so
+extension=sockets.so
+extension=sqlite3.so
+extension=sysvmsg.so
+extension=sysvsem.so
+extension=sysvshm.so
+extension=tidy.so
+extension=tokenizer.so
+extension=xmlreader.so
+extension=xml.so
+extension=xmlwriter.so
+extension=xsl.so
+extension=wddx.so
+extension=zip.so
+#extension=mongodb.so