Commit 89329250 authored by admin's avatar admin
Browse files

环境代码变更

parent 1c5abc14
Showing with 630 additions and 92 deletions
+630 -92
# c6dc86-aliyun-wordpress-billytest
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://gitlab.yun.shop/eos-test/c6dc86-aliyun-wordpress-billytest.git
git branch -M master
git push -uf origin master
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.yun.shop/eos-test/c6dc86-aliyun-wordpress-billytest/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
## Requirements
| Name | Version |
|---------------------------------------------------------------------|----------|
| <a name="requirement_ansible"></a> [ansible](#requirement\_ansible) | 1.1.0-c5 |
| <a name="requirement_cpgspot"></a> [cpgspot](#requirement\_cpgspot) | 0.0.5 |
## Providers
| Name | Version |
|---------------------------------------------------------------|---------|
| <a name="provider_cpgspot"></a> [cpgspot](#provider\_cpgspot) | 0.0.5 |
## Modules
| Name | Source | Version |
|-----------------------------------------------------------------|------------------------------------|---------|
| <a name="module_database"></a> [database](#module\_database) | ./modules/cloudiac-roles-mysql | n/a |
| <a name="module_haproxy"></a> [haproxy](#module\_haproxy) | ./modules/cloudiac-roles-haproxy | n/a |
| <a name="module_php"></a> [php](#module\_php) | ./modules/cloudiac-roles-php | n/a |
| <a name="module_web"></a> [web](#module\_web) | ./modules/cloudiac-roles-web | n/a |
| <a name="module_wordpress"></a> [wordpress](#module\_wordpress) | ./modules/cloudiac-roles-wordpress | n/a |
## Resources
| Name | Type |
|-------------------------|----------|
| cpgspot_env_aliyun.this | resource |
## Inputs
| Name | Description | Type | Default | Required |
|----------------------------------------------------------------------------------------------|-------------|---------------|----------------------|:--------:|
| <a name="input_allocate_public_ip"></a> [allocate\_public\_ip](#input\_allocate\_public\_ip) | 是否申请公网IP | `bool` | `true` | no |
| <a name="input_cpu"></a> [cpu](#input\_cpu) | CPU核心数 | `number` | `2` | no |
| <a name="input_instance_name"></a> [instance\_name](#input\_instance\_name) | 实例名称 | `string` | `"wordpress"` | no |
| <a name="input_instance_number"></a> [instance\_number](#input\_instance\_number) | 实例数量 | `number` | `2` | no |
| <a name="input_memory"></a> [memory](#input\_memory) | 内存大小 | `number` | `4` | no |
| <a name="input_system_disk_size"></a> [system\_disk\_size](#input\_system\_disk\_size) | 系统盘大小 | `number` | `40` | no |
| <a name="input_system_disk_type"></a> [system\_disk\_type](#input\_system\_disk\_type) | 系统盘类型 | `string` | `"cloud_efficiency"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | 实例标签 | `map(string)` | `{}` | no |
## Outputs
| Name | Description |
|----------------------------------------------------------------------------|-------------|
| <a name="output_deploy_units"></a> [deploy\_units](#output\_deploy\_units) | n/a |
| <a name="output_env_info"></a> [env\_info](#output\_env\_info) | n/a |
main.tf 0 → 100644
resource "cpgspot_env_aliyun" "this" {
region = "cn-hangzhou"
service_account_id = 2
name = var.instance_name
description = "wordpress"
cpu = var.cpu
memory = var.memory
allocate_public_ip = var.allocate_public_ip
internet_max_bandwidth_out = 70
vswitchs {
availability_zone = "cn-hangzhou-h"
vswitch_id = "vsw-bp15jwx4e0hbmfwgyyilc"
}
security_groups = ["sg-bp16fd1twy1062dmocgu"]
image_id = "centos_7_9_uefi_x64_20G_alibase_20210611.vhd"
target = var.instance_number
password = local.instance_password
key_pair = "ydd-cpg"
tags = var.tags
sys_disk_size = var.system_disk_size
sys_disk_type = var.system_disk_type
}
module "php" {
source = "./modules/cloudiac-roles-php"
host_ip = local.mysql_host[0]
root_pass = local.instance_password
depends_on = [cpgspot_env_aliyun.this]
}
module "web" {
source = "./modules/cloudiac-roles-web"
host_ip = join(",", jsondecode(cpgspot_env_aliyun.this.resource_attrs)[*].private_ip)
root_pass = local.instance_password
private_ip = local.mysql_host[0]
depends_on = [module.php]
}
module "haproxy" {
source = "./modules/cloudiac-roles-haproxy"
host_ip = local.mysql_host[0]
root_pass = local.instance_password
web1_host = local.mysql_host[0]
web2_host = length(local.mysql_host) >1 ? local.mysql_host[1] : ""
depends_on = [module.wordpress]
}
module "database" {
source = "./modules/cloudiac-roles-mysql"
host_ip = local.mysql_host[0]
root_pass = local.instance_password
mysql_root_password = local.mysql_password
wordpress_database = local.mysql_database
depends_on = [module.web]
}
locals {
instance_password = "Yunjikeji123"
mysql_host = jsondecode(cpgspot_env_aliyun.this.resource_attrs)[*].private_ip
mysql_password = "Yunjikeji123"
mysql_database = "wordpress"
}
module "wordpress" {
source = "./modules/cloudiac-roles-wordpress"
host_ip = local.mysql_host[0]
root_pass = local.instance_password
mysql_root_password = local.mysql_password
wordpress_database = local.mysql_database
mysql_host = local.mysql_host[0]
depends_on = [module.database]
}
\ No newline at end of file
#!/bin/sh
if [[ -z "$ANSIBLE_PRIVATE_KEY_FILE" ]] && [[ $(cat ${CLOUDIAC_WORKSPACE:-.}/ssh_key | wc -c) -gt 1 ]];then
ANSIBLE_PRIVATE_KEY_FILE=${CLOUDIAC_WORKSPACE:-.}/ssh_key
fi
export ANSIBLE_PRIVATE_KEY_FILE
export ANSIBLE_REMOTE_USER=${ANSIBLE_REMOTE_USER:-root}
export ANSIBLE_HOST_KEY_CHECKING="False"
ansible-playbook $@
\ No newline at end of file
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
stats uri /haproxy-stats
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend http
bind 0.0.0.0:8080
default_backend app
backend app
balance roundrobin
resource "null_resource" "null" {
provisioner "local-exec" {
command = "chmod +x ${path.module}/cloudiac-playbook.sh"
}
}
resource "ansible_playbook" "haproxy" {
name = var.host_ip
playbook = "${path.module}/playbook.yml"
groups = ["haproxy"]
replayable = false
extra_vars = {
wait_connection_timeout = var.wait_connection_timeout
ansible_ssh_user = var.ansible_ssh_user
ansible_ssh_pass = var.root_pass
web1_host = var.web1_host
web2_host = var.web2_host
}
ansible_playbook_binary = "${path.module}/cloudiac-playbook.sh"
}
---
- hosts: haproxy
gather_facts: false
tasks:
- name: wait connection
wait_for_connection:
sleep: 1
timeout: "{{ wait_connection_timeout }}"
- name: 获取haproxy状态
shell: ps -ef |grep haproxy |grep -v grep |wc -l
register: haproxy_result
- name: install haproxy
yum:
name: haproxy
state: latest
when: "'{{ haproxy_result.stdout }}' == '0'"
- name: copy haproxy.conf
copy:
src: files/haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
when: "'{{ haproxy_result.stdout }}' == '0'"
- name: config webserver1
lineinfile:
path: /etc/haproxy/haproxy.cfg
line: " server web1 {{ web1_host }}:80 weight 3 check"
- name: config webserver2
lineinfile:
path: /etc/haproxy/haproxy.cfg
line: " server web2 {{ web2_host }}:80 weight 3 check"
when: "'{{ web2_host | length }}' != '0'"
- name: start haproxy
service:
name: haproxy
state: started
enabled: yes
when: "'{{ haproxy_result.stdout }}' == '0'"
variable "host_ip" {
type = string
description = "需要安装wordpress的机器IP,格式'127.0.0.1,127.0.0.2'"
}
variable "wait_connection_timeout" {
type = number
description = "等待虚拟机引导超时时间,引导完成后才进行ssh连接"
default = 300
}
variable "ansible_ssh_user" {
type = string
description = "ssh连接用户"
default = "root"
}
variable "root_pass" {
type = string
description = "ssh连接密码"
sensitive = true
}
variable "web1_host" {
type = string
description = "第一台机器IP"
}
variable "web2_host" {
type = string
description = "第二台机器IP"
}
terraform {
required_providers {
ansible = {
source = "store.cloudiac.org/idcos/ansible"
}
null = {
source = "hashicorp/null"
version = "3.2.1"
}
}
}
#!/bin/sh
if [[ -z "$ANSIBLE_PRIVATE_KEY_FILE" ]] && [[ $(cat ${CLOUDIAC_WORKSPACE:-.}/ssh_key | wc -c) -gt 1 ]];then
ANSIBLE_PRIVATE_KEY_FILE=${CLOUDIAC_WORKSPACE:-.}/ssh_key
fi
export ANSIBLE_PRIVATE_KEY_FILE
export ANSIBLE_REMOTE_USER=${ANSIBLE_REMOTE_USER:-root}
export ANSIBLE_HOST_KEY_CHECKING="False"
ansible-playbook $@
\ No newline at end of file
resource "null_resource" "null" {
provisioner "local-exec" {
command = "chmod +x ${path.module}/cloudiac-playbook.sh"
}
}
resource "ansible_playbook" "mysql" {
name = var.host_ip
playbook = "${path.module}/playbook.yml"
groups = ["mysql"]
replayable = false
extra_vars = {
wait_connection_timeout = var.wait_connection_timeout
ansible_ssh_user = var.ansible_ssh_user
ansible_ssh_pass = var.root_pass
mysql_root_password = var.mysql_root_password
wordpress_database = var.wordpress_database
}
ansible_playbook_binary = "${path.module}/cloudiac-playbook.sh"
depends_on = [ null_resource.null ]
}
---
- hosts: mysql
gather_facts: false
tasks:
- name: wait connection
wait_for_connection:
sleep: 1
timeout: "{{ wait_connection_timeout }}"
- name: 获取mysql状态
shell: netstat -tunlp|grep 3306 |grep -v grep |wc -l
register: mysql_result
- name: install mysql
shell: |
rm -rf /etc/yum.repos.d/*
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum -y install http://mirrors.ustc.edu.cn/mysql-repo/mysql-community-release-el7-7.noarch.rpm
#yum -y install http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
sed -i 's~repo.mysql.com~mirrors.ustc.edu.cn/mysql-repo~' /etc/yum.repos.d/mysql-community.repo
yum -y install mysql-community-server --nogpgcheck
when: "'{{ mysql_result.stdout }}' == '0'"
- name: start mysql
service:
name: mysqld
state: started
enabled: yes
when: "'{{ mysql_result.stdout }}' == '0'"
- name: get mysql root pass
shell: grep 'temporary password' /var/log/mysqld.log |awk 'END{print $NF}'
register: rootpass
when: "'{{ mysql_result.stdout }}' == '0'"
- name: 更新数据库密码策略
ignore_errors: True
shell: mysql -u root -p'{{ rootpass.stdout }}' --connect-expired-password -e 'set global validate_password_policy=0;'
when: "'{{ mysql_result.stdout }}' == '0'"
- name: 更新 MySQL root 密码 (5.7.x).
ignore_errors: True
shell: mysql -u root -p'{{ rootpass.stdout }}' --connect-expired-password -e 'ALTER USER "root"@"localhost" IDENTIFIED BY "{{ mysql_root_password }}";'
when: "'{{ mysql_result.stdout }}' == '0'"
- name: 创建数据库
ignore_errors: True
shell: |
mysql -u root -p'{{ mysql_root_password }}' --connect-expired-password -e "create database {{ wordpress_database }};"
when: "'{{ mysql_result.stdout }}' == '0'"
- name: 允许root远程连接
ignore_errors: True
shell: |
mysql -u root -p'{{ mysql_root_password }}' --connect-expired-password -e "GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '{{ mysql_root_password }}' WITH GRANT OPTION;"
when: "'{{ mysql_result.stdout }}' == '0'"
- name: 刷新数据库权限
ignore_errors: True
shell: |
mysql -u root -p'{{ mysql_root_password }}' --connect-expired-password -e "FLUSH PRIVILEGES;"
when: "'{{ mysql_result.stdout }}' == '0'"
variable "host_ip" {
type = string
description = "需要安装wordpress的机器IP,格式'127.0.0.1,127.0.0.2'"
}
variable "ansible_ssh_user" {
type = string
description = "ssh连接用户"
default = "root"
}
variable "root_pass" {
type = string
description = "ssh连接密码"
sensitive = true
}
variable "wait_connection_timeout" {
type = number
description = "等待虚拟机引导超时时间,引导完成后才进行ssh连接"
default = 300
}
variable "mysql_root_password" {
type = string
description = "mysql root用户密码"
sensitive = true
}
variable "wordpress_database" {
type = string
description = "wordpress数据库"
default = "wordpress"
}
terraform {
required_providers {
ansible = {
source = "store.cloudiac.org/idcos/ansible"
}
null = {
source = "hashicorp/null"
version = "3.2.1"
}
}
}
#!/bin/sh
if [[ -z "$ANSIBLE_PRIVATE_KEY_FILE" ]] && [[ $(cat ${CLOUDIAC_WORKSPACE:-.}/ssh_key | wc -c) -gt 1 ]];then
ANSIBLE_PRIVATE_KEY_FILE=${CLOUDIAC_WORKSPACE:-.}/ssh_key
fi
export ANSIBLE_PRIVATE_KEY_FILE
export ANSIBLE_REMOTE_USER=${ANSIBLE_REMOTE_USER:-root}
export ANSIBLE_HOST_KEY_CHECKING="False"
ansible-playbook $@
\ No newline at end of file
resource "null_resource" "null" {
provisioner "local-exec" {
command = "chmod +x ${path.module}/cloudiac-playbook.sh"
}
}
resource "ansible_playbook" "php" {
name = var.host_ip
playbook = "${path.module}/playbook.yml"
groups = ["php"]
replayable = false
ansible_playbook_binary = "${path.module}/cloudiac-playbook.sh"
extra_vars = {
wait_connection_timeout = var.wait_connection_timeout
ansible_ssh_user = var.ansible_ssh_user
ansible_ssh_pass = var.root_pass
}
}
---
- hosts: php
gather_facts: false
tasks:
- name: wait connection
wait_for_connection:
sleep: 1
timeout: "{{ wait_connection_timeout }}"
- name: 获取php状态
shell: netstat -tunlp |grep php-fpm |grep -v grep |wc -l
register: php_result
- name: install ius
shell: yum -y install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
when: "'{{ php_result.stdout }}' == '0'"
- name: install webtatic
shell: rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
when: "'{{ php_result.stdout }}' == '0'"
- name: install php
shell: yum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongodb
when: "'{{ php_result.stdout }}' == '0'"
- name: start php-fpm
service:
name: php-fpm
state: started
enabled: yes
variable "host_ip" {
type = string
description = "需要安装wordpress的机器IP,格式'127.0.0.1,127.0.0.2'"
}
variable "wait_connection_timeout" {
type = number
description = "等待虚拟机引导超时时间,引导完成后才进行ssh连接"
default = 300
}
variable "ansible_ssh_user" {
type = string
description = "ssh连接用户"
default = "root"
}
variable "root_pass" {
type = string
description = "ssh连接密码"
sensitive = true
}
terraform {
required_providers {
ansible = {
source = "store.cloudiac.org/idcos/ansible"
}
null = {
source = "hashicorp/null"
version = "3.2.1"
}
}
}
#!/bin/sh
if [[ -z "$ANSIBLE_PRIVATE_KEY_FILE" ]] && [[ $(cat ${CLOUDIAC_WORKSPACE:-.}/ssh_key | wc -c) -gt 1 ]];then
ANSIBLE_PRIVATE_KEY_FILE=${CLOUDIAC_WORKSPACE:-.}/ssh_key
fi
export ANSIBLE_PRIVATE_KEY_FILE
export ANSIBLE_REMOTE_USER=${ANSIBLE_REMOTE_USER:-root}
export ANSIBLE_HOST_KEY_CHECKING="False"
ansible-playbook $@
\ No newline at end of file
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
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 /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
location / {
index index.php index.html index.htm;
}
location ~ .php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
# Settings for a TLS enabled server.
#
# server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# server_name _;
# root /usr/share/nginx/html;
#
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
#
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
#
# error_page 404 /404.html;
# location = /40x.html {
# }
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment