This commit is contained in:
chenc
2024-07-15 13:21:08 +08:00
commit 44567b7d57
149 changed files with 20915 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
:80 {
# Set this path to your site's directory.
root * /data/wwwroot/default
# Enable the static file server.
file_server
# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile
+25
View File
@@ -0,0 +1,25 @@
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;
# use any of the following two
real_ip_header CF-Connecting-IP;
#real_ip_header X-Forwarded-For;
+3
View File
@@ -0,0 +1,3 @@
location / {
try_files $uri $uri/ /index.php?/$request_uri;
}
+12
View File
@@ -0,0 +1,12 @@
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last;
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last;
#if (!-e $request_filename) {
# return 404;
#}
+4
View File
@@ -0,0 +1,4 @@
if (!-e $request_filename) {
rewrite ^/update.php(.*)$ /update.php?q=$1 last;
rewrite ^/(.*)$ /index.php?q=$1 last;
}
+31
View File
@@ -0,0 +1,31 @@
if (!-e $request_filename) {
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last;
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last;
rewrite "^/feed\.xml$" /feed.php last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3 last;
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2 last;
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$1 last;
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$1 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$1&page=$2 last;
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$1 last;
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$1 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2&page=$3 last;
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2 last;
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$1 last;
rewrite "^/tag-(.*)\.html" /search.php?keywords=$1 last;
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$1 last;
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$1 last;
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$1 last;
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$1&act=view last;
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last;
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1 last;
}
+321
View File
@@ -0,0 +1,321 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="OneinStack - A PHP/JAVA Deployment Tool. In order to quickly deploy lnmp,lamp,lnmpa,ltmp,lnmh,MySQL,PostgreSQL,MongoDB,oneinstack.com">
<meta name="author" content="yeho">
<title>Welcome to use OneinStack</title>
<link href="https://static.oneinstack.com/assets/ois.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="">OneinStack</a>
<form class="w-100" action="https://lempstack.com/qa/" method="GET" target="_blank">
<input class="form-control form-control-dark w-100" type="text" placeholder="What do you want to know?" aria-label="What do you want to know?" name="qs">
</form>
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap">
<a class="nav-link" href="https://lempstack.com" target="_blank">OneinStack</a>
</li>
</ul>
</nav>
<div class="container-fluid">
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="###home" id="home_link">
<span data-feather="home"></span>
Control center <span class="sr-only">(current)</span>
</a>
</li>
<!--<li class="nav-item">
<a class="nav-link" href="###step" id="step_link">
<span data-feather="file"></span>
</a>
</li>-->
<li class="nav-item">
<a class="nav-link" href="###vhost" id="vhost_link">
<span data-feather="layers"></span>
Virtual host
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###db" id="db_link">
<span data-feather="shopping-cart"></span>
Database
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###ftp" id="ftp_link">
<span data-feather="users"></span>
FTP
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###tools" id="tools_link">
<span data-feather="briefcase"></span>
Tools
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###manage" id="manage_link">
<span data-feather="bar-chart-2"></span>
Manage service
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###backup" id="backup_link">
<span data-feather="disc"></span>
Backup
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###upgrade" id="upgrade_link">
<span data-feather="trending-up"></span>
Upgrade & Uninstall
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###port" id="port_link">
<span data-feather="cloud"></span>
Security group
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###donation" id="donation_link">
<span data-feather="heart"></span>
Donation
</a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>OneinStack</span>
<a class="d-flex align-items-center text-muted" href="https://lempstack.com/" target="_blank">
<span data-feather="chevron-down"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="https://lempstack.com/" target="_blank">
<span data-feather="home"></span>
OneinStack Home
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://lempstack.com/install/" target="_blank">
<span data-feather="help-circle"></span>
Install & Docs
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://lempstack.com/faq/" target="_blank">
<span data-feather="link"></span>
FAQ
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://lempstack.com/changelog/" target="_blank">
<span data-feather="link"></span>
ChangeLog
</a>
</li>
</ul>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2" id="home">Control center</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<a class="btn btn-sm btn-outline-primary btn_prober" href="xprober.php" target="_blank"><span data-feather="compass"></span> prober</a>
<a class="btn btn-sm btn-outline-info btn_phpinfo" href="phpinfo.php" target="_blank"><span data-feather="info"></span> phpinfo</a>
<a class="btn btn-sm btn-outline-secondary btn_op" href="ocp.php" target="_blank"><span data-feather="cpu"></span> Opcache</a>
</div>
<a class="btn btn-sm btn-outline-warning mr-2 btn_pma" href="phpMyAdmin/" target="_blank">
<span data-feather="database"></span> phpMyAdmin
</a>
</div>
</div>
<section class="section" id="home_section">
<h2>Congratulations, OneinStack installed successfully!</h2>
<h3><a href="https://oneinstack.com" target="_blank" class="links">OneinStack </a><a href="https://linuxeye.com/" target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona</br>+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc.</h3>
</section>
<section class="section" id="tools_section">
<h2 class="mt-5" id="tools">Tools</h2>
<a class="btn btn-primary btn_prober" href="xprober.php" target="_blank" role="button">prober</a>
<a class="btn btn-info btn_phpinfo" href="phpinfo.php" target="_blank" role="button">phpinfo</a>
<a class="btn btn-success btn_pma" href="phpMyAdmin/" target="_blank" role="button">phpMyAdmin</a>
<a class="btn btn-secondary btn_op" href="ocp.php" target="_blank" role="button">Opcache</a>
</section>
<section class="section" id="step_section">
<h2 class="mt-5" id="step">Steps</h2>
<div class="card-deck mb-3 text-center">
<div class="card mb-4 box-shadow">
<div class="card-header">
<h4 class="my-0 font-weight-normal">Dns analysis</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">Domain<small class="text-muted"> control</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>Cloudflare</li>
<li>Alibabacloud</li>
<li>DNSPOD</li>
</ul>
<a href="https://www.alibabacloud.com/help/faq-detail/35854.htm" target="_blank" type="role" class="btn btn-lg btn-block btn-primary">BROWSE DOCS</a>
</div>
</div>
<div class="card mb-4 box-shadow">
<div class="card-header">
<h4 class="my-0 font-weight-normal">Add virtual host</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">Create<small class="text-muted"> website</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>Add virtual host: ./vhost.sh</li>
<li>Del virtual host: ./vhost.sh --del</li>
<li>Manage FTP account: ./pureftpd_vhost.sh</li>
</ul>
<a href="https://lempstack.com/install/" target="_blank" type="role" class="btn btn-lg btn-block btn-primary">BROWSE DOCS</a>
</div>
</div>
<div class="card mb-4 box-shadow">
<div class="card-header">
<h4 class="my-0 font-weight-normal">Deploy website</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">Online<small class="text-muted"> running</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li><a href="phpMyAdmin/" target="_blank">phpMyAdmin</a></li>
<li>Manage FTP account: ./pureftpd_vhost.sh</li>
<li>Backup: ./backup_setup.sh</li>
</ul>
<a href="https://lempstack.com/install/" target="_blank" type="role" class="btn btn-lg btn-block btn-primary">BROWSE DOCS</a>
</div>
</div>
</div>
</section>
<section class="section" id="vhost_section">
<h2 class="mt-5" id="vhost">How to add a virtual host?</h2>
<div class="alert alert-primary" role="alert">
<code>./vhost.sh</code>
</div>
<img class="img-fluid" src="https://static.oneinstack.com/images/vhost.png" alt="《Interactive install》">
<h2 class="mt-5">How to delete a virtual host?</h2>
<div class="alert alert-primary" role="alert">
<code>./vhost.sh --del</code>
</div>
<img class="img-fluid" src="https://static.oneinstack.com/images/vhost_del.png" alt="《Interactive install》">
</section>
<section class="section" id="ftp_section">
<h2 class="mt-5">FTP Client</h2>
<h3>FileZilla: <a href="https://filezilla-project.org/download.php" target="_blank" class="links">Download address</a></h3>
<h2 class="mt-5" id="ftp">How to add FTP virtual user?</h2>
<div class="alert alert-primary" role="alert"><code>./pureftpd_vhost.sh</code></pre></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/pureftpd.png" alt="《Interactive install》">
</section>
<section class="section" id="db_section">
<h2 class="mt-5" id="db">Database</h2>
<div class="list-group">
<a href="phpMyAdmin" target="_blank" class="list-group-item list-group-item-action active">
phpMyAdmin
</a>
<a href="https://lempstack.com/question/display-default-mysql-root-password/" target="_blank" class="list-group-item list-group-item-action">Display default MySQL root password</a>
<a href="https://lempstack.com/question/how-to-setup-a-remote-mysql-connection/" target="_blank" class="list-group-item list-group-item-action">How to setup a remote MySQL connection?</a>
</div>
</section>
<section class="section" id="backup_section">
<h2 class="mt-5" id="backup">How to backup?</h2>
<div class="alert alert-primary" role="alert"><code>./backup_setup.sh # Set backup options</code></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/backup_setup.png" alt="《Interactive install》">
<div class="alert alert-primary" role="alert"><pre><code>./backup.sh # Start backup, You can add cron jobs
# crontab -l # Examples
0 1 * * * ~/oneinstack/backup.sh &gt; /dev/null 2&gt;&amp;1 &amp;</code></pre></div>
</section>
<section class="section" id="manage_section">
<h2 class="mt-5" id="manage">How to manage service?</h2>
<p class="mt-4">Nginx/Tengine/OpenResty:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} nginx</code></div>
<p class="mt-4">MySQL/MariaDB/Percona:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|reload|status} mysqld</code></div>
<p class="mt-4">PostgreSQL:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|status} postgresql</code></div>
<p class="mt-4">MongoDB:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} mongod</code></div>
<p class="mt-4">PHP:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|reload|status} php-fpm</code></div>
<p class="mt-4">Apache:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|restart|stop} httpd</code></div>
<p class="mt-4">Tomcat:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart} tomcat</code></div>
<p class="mt-4">Pure-Ftpd:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|status} pureftpd</code></div>
<p class="mt-4">Redis:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} redis-server</code></div>
<p class="mt-4">Memcached:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} memcached</code></div>
</section>
<section class="section" id="upgrade_section">
<h2 class="mt-5" id="upgrade">How to upgrade?</h2>
<div class="alert alert-primary" role="alert"><code>./upgrade.sh</code></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/upgrade.png" alt="">
<h2 class="mt-5">How to uninstall?</h2>
<div class="alert alert-primary" role="alert"><code>./uninstall.sh</code></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/uninstall.png" alt="">
</section>
<section class="section" id="port_section">
<div class="card text-white bg-danger" style="width: 20rem;">
<div class="card-header">
You must specify port numbers (for TCP):
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item text-danger">ssh: 22</li>
<li class="list-group-item text-danger">http: 80</li>
<li class="list-group-item text-danger">https: 443</li>
<li class="list-group-item text-danger">ftp: 21, 20000~30000</li>
</ul>
</div>
<div class="list-group mt-5" style="width: 18rem;">
<a class="list-group-item list-group-item-action active">
Security Groups for Your VPC
</a>
<a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html" target="_blank" class="list-group-item list-group-item-action">AWS Security groups</a>
<a href="https://docs.microsoft.com/en-us/azure/virtual-network/security-overview" target="_blank" class="list-group-item list-group-item-action">Azure Security groups</a>
<a href="https://www.alibabacloud.com/help/doc-detail/58746.htm" target="_blank" class="list-group-item list-group-item-action">Alibabacloud Security group</a>
</div>
</section>
<div align="center" class="mt-5"><iframe src="https://static.oneinstack.com/ad_buttom.html" width="475" frameborder="0" scrolling="no"></iframe></div>
<div>
<p>
<a href="https://oneinstack.com" target="_blank">OneinStack</a> by <a href="https://linuxeye.com/" target="_blank">LinuxEye</a>
&nbsp; &nbsp; &nbsp; &nbsp; Telegram Group:&nbsp;&nbsp; <a target="_blank" class="links" href="https://t.me/oneinstack">t.me/oneinstack</a>
</p>
<p align="right"><a href="#">Top</a></p>
</div>
</main>
</div>
</div>
<script src="https://static.oneinstack.com/assets/ois20190114.js"></script>
</body>
</html>
+322
View File
@@ -0,0 +1,322 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="OneinStack是一键PHP/JAVA安装脚本工具,包含lnmp,lamp,lnmpa,ltmp,lnmh,MySQL,PostgreSQL,MongoDB等,官网oneinstack.com">
<meta name="author" content="yeho">
<title>欢迎您使用OneinStack</title>
<link href="https://static.oneinstack.com/assets/ois.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="">OneinStack</a>
<form class="w-100" action="https://oneinstack.com/qa/" method="GET" target="_blank">
<input class="form-control form-control-dark w-100" type="text" placeholder="搜索OneinStack官网问答" aria-label="搜索OneinStack官网问答" name="qs">
</form>
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap">
<a class="nav-link" href="https://oneinstack.com" target="_blank">OneinStack官网</a>
</li>
</ul>
</nav>
<div class="container-fluid">
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="###home" id="home_link">
<span data-feather="home"></span>
控制中心 <span class="sr-only">(current)</span>
</a>
</li>
<!--<li class="nav-item">
<a class="nav-link" href="###step" id="step_link">
<span data-feather="file"></span>
</a>
</li>-->
<li class="nav-item">
<a class="nav-link" href="###vhost" id="vhost_link">
<span data-feather="layers"></span>
虚拟主机管理
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###db" id="db_link">
<span data-feather="shopping-cart"></span>
数据库管理
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###ftp" id="ftp_link">
<span data-feather="users"></span>
FTP管理
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###tools" id="tools_link">
<span data-feather="briefcase"></span>
运维工具
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###manage" id="manage_link">
<span data-feather="bar-chart-2"></span>
管理服务
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###backup" id="backup_link">
<span data-feather="disc"></span>
备份
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###upgrade" id="upgrade_link">
<span data-feather="trending-up"></span>
升级 & 卸载
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###port" id="port_link">
<span data-feather="cloud"></span>
端口开放教程
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="###donation" id="donation_link">
<span data-feather="heart"></span>
捐赠
</a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>OneinStack官网</span>
<a class="d-flex align-items-center text-muted" href="https://oneinstack.com/" target="_blank">
<span data-feather="chevron-down"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="https://oneinstack.com/" target="_blank">
<span data-feather="home"></span>
OneinStack首页
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://oneinstack.com/install/" target="_blank">
<span data-feather="help-circle"></span>
安装、使用方法
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://oneinstack.com/faq/" target="_blank">
<span data-feather="link"></span>
FAQ
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://oneinstack.com/changelog/" target="_blank">
<span data-feather="link"></span>
更新日志
</a>
</li>
</ul>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2" id="home">控制中心</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<a class="btn btn-sm btn-outline-primary btn_prober" href="xprober.php" target="_blank"><span data-feather="compass"></span> 探针</a>
<a class="btn btn-sm btn-outline-info btn_phpinfo" href="phpinfo.php" target="_blank"><span data-feather="info"></span> phpinfo</a>
<a class="btn btn-sm btn-outline-secondary btn_op" href="ocp.php" target="_blank"><span data-feather="cpu"></span> Opcache</a>
</div>
<a class="btn btn-sm btn-outline-warning mr-2 btn_pma" href="phpMyAdmin/" target="_blank">
<span data-feather="database"></span> phpMyAdmin
</a>
</div>
</div>
<section class="section" id="home_section">
<h2>Congratulations, OneinStack installed successfully!</h2>
<h3><a href="https://oneinstack.com" target="_blank" class="links">OneinStack </a><a href="https://linuxeye.com/" target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona</br>+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc.</h3>
</section>
<section class="section" id="tools_section">
<h2 class="mt-5" id="tools">主机工具</h2>
<a class="btn btn-primary btn_prober" href="xprober.php" target="_blank" role="button">探针</a>
<a class="btn btn-info btn_phpinfo" href="phpinfo.php" target="_blank" role="button">phpinfo</a>
<a class="btn btn-success btn_pma" href="phpMyAdmin/" target="_blank" role="button">phpMyAdmin</a>
<a class="btn btn-secondary btn_op" href="ocp.php" target="_blank" role="button">Opcache</a>
</section>
<section class="section" id="step_section">
<h2 class="mt-5" id="step">基本使用步骤</h2>
<div class="card-deck mb-3 text-center">
<div class="card mb-4 box-shadow">
<div class="card-header">
<h4 class="my-0 font-weight-normal">域名解析</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">域名<small class="text-muted">控制</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>阿里云(万网)</li>
<li>DNSPOD</li>
<li>Cloudflare</li>
</ul>
<a href="https://help.aliyun.com/document_detail/29716.html" target="_blank" type="role" class="btn btn-lg btn-block btn-primary">详细教程</a>
</div>
</div>
<div class="card mb-4 box-shadow">
<div class="card-header">
<h4 class="my-0 font-weight-normal">新建虚拟主机</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">建立<small class="text-muted">网站</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li>新建虚拟主机 ./vhost.sh</li>
<li>删除虚拟主机 ./vhost.sh --del</li>
<li>管理FTP账号 ./pureftpd_vhost.sh</li>
</ul>
<a href="https://oneinstack.com/install/" target="_blank" type="role" class="btn btn-lg btn-block btn-primary">详细教程</a>
</div>
</div>
<div class="card mb-4 box-shadow">
<div class="card-header">
<h4 class="my-0 font-weight-normal">部署网站</h4>
</div>
<div class="card-body">
<h1 class="card-title pricing-card-title">上线<small class="text-muted">运行</small></h1>
<ul class="list-unstyled mt-3 mb-4">
<li><a href="phpMyAdmin/" target="_blank">phpMyAdmin</a></li>
<li>管理FTP账号 ./pureftpd_vhost.sh</li>
<li>备份 ./backup_setup.sh</li>
</ul>
<a href="https://oneinstack.com/install/" target="_blank" type="role" class="btn btn-lg btn-block btn-primary">详细教程</a>
</div>
</div>
</div>
</section>
<section class="section" id="vhost_section">
<h2 class="mt-5" id="vhost">如何添加虚拟主机?</h2>
<div class="alert alert-primary" role="alert">
<code>./vhost.sh</code>
</div>
<img class="img-fluid" src="https://static.oneinstack.com/images/vhost.png" alt="《交互安装》">
<h2 class="mt-5">如何删除虚拟主机?</h2>
<div class="alert alert-primary" role="alert">
<code>./vhost.sh --del</code>
</div>
<img class="img-fluid" src="https://static.oneinstack.com/images/vhost_del.png" alt="《交互安装》">
</section>
<section class="section" id="ftp_section">
<h2 class="mt-5">FTP客户端推荐</h2>
<h3>FileZilla: <a href="https://filezilla-project.org/download.php" target="_blank" class="links">下载地址</a></h3>
<h2 class="mt-5" id="ftp">如何管理FTP账号?</h2>
<div class="alert alert-primary" role="alert"><code>./pureftpd_vhost.sh</code></pre></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/pureftpd.png" alt="《交互安装》">
</section>
<section class="section" id="db_section">
<h2 class="mt-5" id="db">数据库</h2>
<div class="list-group">
<a href="phpMyAdmin" target="_blank" class="list-group-item list-group-item-action active">
phpMyAdmin
</a>
<a href="https://oneinstack.com/question/17347/" target="_blank" class="list-group-item list-group-item-action">如何获取MySQL root密码?</a>
<a href="https://oneinstack.com/question/oneinstack-how-to-configure-mysql-remote-connection/" target="_blank" class="list-group-item list-group-item-action">如何配置MySQL远程连接?</a>
</div>
</section>
<section class="section" id="backup_section">
<h2 class="mt-5" id="backup">如何备份?</h2>
<div class="alert alert-primary" role="alert"><code>./backup_setup.sh # Set backup options</code></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/backup_setup.png" alt="《交互安装》">
<div class="alert alert-primary" role="alert"><pre><code>./backup.sh # Start backup, You can add cron jobs
# crontab -l # Examples
0 1 * * * ~/oneinstack/backup.sh &gt; /dev/null 2&gt;&amp;1 &amp;</code></pre></div>
</section>
<section class="section" id="manage_section">
<h2 class="mt-5" id="manage">如何管理服务?</h2>
<p class="mt-4">Nginx/Tengine/OpenResty:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} nginx</code></div>
<p class="mt-4">MySQL/MariaDB/Percona:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|reload|status} mysqld</code></div>
<p class="mt-4">PostgreSQL:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|status} postgresql</code></div>
<p class="mt-4">MongoDB:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} mongod</code></div>
<p class="mt-4">PHP:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|reload|status} php-fpm</code></div>
<p class="mt-4">Apache:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|restart|stop} httpd</code></div>
<p class="mt-4">Tomcat:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart} tomcat</code></div>
<p class="mt-4">Pure-Ftpd:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|restart|status} pureftpd</code></div>
<p class="mt-4">Redis:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} redis-server</code></div>
<p class="mt-4">Memcached:</p>
<div class="alert alert-primary" role="alert"><code>systemctl {start|stop|status|restart|reload} memcached</code></div>
</section>
<section class="section" id="upgrade_section">
<h2 class="mt-5" id="upgrade">如何更新版本?</h2>
<div class="alert alert-primary" role="alert"><code>./upgrade.sh</code></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/upgrade.png" alt="">
<h2 class="mt-5">如何卸载?</h2>
<div class="alert alert-primary" role="alert"><code>./uninstall.sh</code></div>
<img class="img-fluid" src="https://static.oneinstack.com/images/uninstall.png" alt="">
</section>
<section class="section" id="port_section">
<!--<h2 class="mt-5" id="port">云主机安全组端口开放教程<span class="badge badge-secondary">Version 1.0.0</span></h2>-->
<div class="card text-white bg-danger" style="width: 18rem;">
<div class="card-header">
云主机安全组必须打开如下端口:
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item text-danger">ssh: 22</li>
<li class="list-group-item text-danger">http: 80</li>
<li class="list-group-item text-danger">https: 443</li>
<li class="list-group-item text-danger">ftp: 21, 20000~30000</li>
</ul>
</div>
<div class="list-group mt-5" style="width: 18rem;">
<a class="list-group-item list-group-item-action active">
云主机安全组端口开放教程
</a>
<a href="https://oneinstack.com/docs/securitygroup/#11" target="_blank" class="list-group-item list-group-item-action">阿里云安全组端口</a>
<a href="https://oneinstack.com/docs/securitygroup/#12" target="_blank" class="list-group-item list-group-item-action">腾讯云安全组端口</a>
<a href="https://oneinstack.com/docs/securitygroup/#13" target="_blank" class="list-group-item list-group-item-action">华为云安全组端口</a>
</div>
</section>
<div align="center" class="mt-5"><iframe src="https://static.oneinstack.com/ad_buttom.html" width="475" frameborder="0" scrolling="no"></iframe></div>
<div>
<p>
<a href="https://oneinstack.com" target="_blank">OneinStack</a> by <a href="https://linuxeye.com/" target="_blank">LinuxEye</a>
&nbsp; &nbsp; &nbsp; &nbsp; QQ群:&nbsp;&nbsp; 262601796(新) 558540514(付费千人群)</a>
</p>
<p align="right"><a href="#">回顶部</a></p>
</div>
</main>
</div>
</div>
<script src="https://static.oneinstack.com/assets/ois20190114.js"></script>
</body>
</html>
+3
View File
@@ -0,0 +1,3 @@
location / {
try_files $uri $uri/ /index.php?$args;
}
+3
View File
@@ -0,0 +1,3 @@
location / {
try_files $uri $uri/ /index.php?$query_string;
}
+171
View File
@@ -0,0 +1,171 @@
server {
listen 80;
server_name oneinstack.com;
set $MAGE_ROOT /data/wwwroot/default;
root $MAGE_ROOT/pub;
index index.php;
autoindex off;
charset UTF-8;
error_page 404 403 /errors/404.php;
#add_header "X-UA-Compatible" "IE=Edge";
# PHP entry point for setup application
location ~* ^/setup($|/) {
root $MAGE_ROOT;
location ~ ^/setup/index.php {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/setup/(?!pub/). {
deny all;
}
location ~ ^/setup/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}
# PHP entry point for update application
location ~* ^/update($|/) {
root $MAGE_ROOT;
location ~ ^/update/index.php {
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
# Deny everything but index.php
location ~ ^/update/(?!pub/). {
deny all;
}
location ~ ^/update/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location /pub/ {
location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
deny all;
}
alias $MAGE_ROOT/pub/;
add_header X-Frame-Options "SAMEORIGIN";
}
location /static/ {
# Uncomment the following line in production mode
# expires max;
# Remove signature of the static files that is used to overcome the browser cache
location ~ ^/static/version {
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /media/ {
try_files $uri $uri/ /get.php?$args;
location ~ ^/media/theme_customization/.*\.xml {
deny all;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
try_files $uri $uri/ /get.php?$args;
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
try_files $uri $uri/ /get.php?$args;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /media/customer/ {
deny all;
}
location /media/downloadable/ {
deny all;
}
location /media/import/ {
deny all;
}
# PHP entry point for main application
location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_buffers 1024 4k;
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/xml+rss
image/svg+xml;
gzip_vary on;
# Banned locations (only reached if the earlier PHP entry point regexes don't match)
location ~* (\.php$|\.htaccess$|\.git) {
deny all;
}
}
+82
View File
@@ -0,0 +1,82 @@
#(可选)添加如下header主要为了安全
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
#(可选)为了支持user_webfinger app
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
#这儿是为了支持日历和联系人,建议加上
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
#设置上传文件的最大大小(还和php里的那个设置有关)
client_max_body_size 512M;
fastcgi_buffers 64 4K;
#最主要的,将所有请求转发到index.php上
location / {
rewrite ^ /index.php$uri;
}
#安全设置,禁止访问部分敏感内容
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
#这部分吧,默认就有,不过有所不同,所以我合并了下,替换原来的就行
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
include fastcgi.conf;
}
#安全设置,禁止访问部分敏感内容
location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}
location ~ \.(?:css|js|woff|svg|gif)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=15778463";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
access_log off;
}
location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
+123
View File
@@ -0,0 +1,123 @@
user www www;
worker_processes auto;
error_log /data/wwwlogs/error_nginx.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 1024m;
client_body_buffer_size 10m;
sendfile on;
tcp_nopush on;
keepalive_timeout 120;
server_tokens off;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
fastcgi_intercept_errors on;
#Gzip Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
text/javascript application/javascript application/x-javascript
text/x-json application/json application/x-web-app-manifest+json
text/css text/plain text/x-component
font/opentype application/x-font-ttf application/vnd.ms-fontobject
image/x-icon;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
##Brotli Compression
#brotli on;
#brotli_comp_level 6;
#brotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
##If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
#open_file_cache max=1000 inactive=20s;
#open_file_cache_valid 30s;
#open_file_cache_min_uses 2;
#open_file_cache_errors on;
log_format json escape=json '{"@timestamp":"$time_iso8601",'
'"server_addr":"$server_addr",'
'"remote_addr":"$remote_addr",'
'"scheme":"$scheme",'
'"request_method":"$request_method",'
'"request_uri": "$request_uri",'
'"request_length": "$request_length",'
'"uri": "$uri", '
'"request_time":$request_time,'
'"body_bytes_sent":$body_bytes_sent,'
'"bytes_sent":$bytes_sent,'
'"status":"$status",'
'"upstream_time":"$upstream_response_time",'
'"upstream_host":"$upstream_addr",'
'"upstream_status":"$upstream_status",'
'"host":"$host",'
'"http_referer":"$http_referer",'
'"http_user_agent":"$http_user_agent"'
'}';
######################## default ############################
server {
listen 80;
server_name _;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/wwwroot/default;
index index.html index.htm index.php;
#error_page 404 /404.html;
#error_page 502 /502.html;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ ^/(\.user.ini|\.ht|\.git|\.svn|\.project|LICENSE|README.md) {
deny all;
}
location /.well-known {
allow all;
}
}
########################## vhost #############################
include vhost/*.conf;
}
+128
View File
@@ -0,0 +1,128 @@
user www www;
worker_processes auto;
error_log /data/wwwlogs/error_nginx.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 1024m;
client_body_buffer_size 10m;
sendfile on;
tcp_nopush on;
keepalive_timeout 120;
server_tokens off;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
fastcgi_intercept_errors on;
#Gzip Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
text/javascript application/javascript application/x-javascript
text/x-json application/json application/x-web-app-manifest+json
text/css text/plain text/x-component
font/opentype application/x-font-ttf application/vnd.ms-fontobject
image/x-icon;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
##Brotli Compression
#brotli on;
#brotli_comp_level 6;
#brotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
##If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
#open_file_cache max=1000 inactive=20s;
#open_file_cache_valid 30s;
#open_file_cache_min_uses 2;
#open_file_cache_errors on;
log_format json escape=json '{"@timestamp":"$time_iso8601",'
'"server_addr":"$server_addr",'
'"remote_addr":"$remote_addr",'
'"scheme":"$scheme",'
'"request_method":"$request_method",'
'"request_uri": "$request_uri",'
'"request_length": "$request_length",'
'"uri": "$uri", '
'"request_time":$request_time,'
'"body_bytes_sent":$body_bytes_sent,'
'"bytes_sent":$bytes_sent,'
'"status":"$status",'
'"upstream_time":"$upstream_response_time",'
'"upstream_host":"$upstream_addr",'
'"upstream_status":"$upstream_status",'
'"host":"$host",'
'"http_referer":"$http_referer",'
'"http_user_agent":"$http_user_agent"'
'}';
######################## default ############################
server {
listen 80;
server_name _;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/wwwroot/default;
index index.html index.htm index.php;
#error_page 404 /404.html;
#error_page 502 /502.html;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ [^/]\.php(/|$) {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ ^/(\.user.ini|\.ht|\.git|\.svn|\.project|LICENSE|README.md) {
deny all;
}
location /.well-known {
allow all;
}
}
########################## vhost #############################
include vhost/*.conf;
}
+121
View File
@@ -0,0 +1,121 @@
user www www;
worker_processes auto;
error_log /data/wwwlogs/error_nginx.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 51200;
events {
use epoll;
worker_connections 51200;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 1024m;
client_body_buffer_size 10m;
sendfile on;
tcp_nopush on;
keepalive_timeout 120;
server_tokens off;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
fastcgi_intercept_errors on;
#Gzip Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
text/javascript application/javascript application/x-javascript
text/x-json application/json application/x-web-app-manifest+json
text/css text/plain text/x-component
font/opentype application/x-font-ttf application/vnd.ms-fontobject
image/x-icon;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
##Brotli Compression
#brotli on;
#brotli_comp_level 6;
#brotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
##If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
#open_file_cache max=1000 inactive=20s;
#open_file_cache_valid 30s;
#open_file_cache_min_uses 2;
#open_file_cache_errors on;
log_format json escape=json '{"@timestamp":"$time_iso8601",'
'"server_addr":"$server_addr",'
'"remote_addr":"$remote_addr",'
'"scheme":"$scheme",'
'"request_method":"$request_method",'
'"request_uri": "$request_uri",'
'"request_length": "$request_length",'
'"uri": "$uri", '
'"request_time":$request_time,'
'"body_bytes_sent":$body_bytes_sent,'
'"bytes_sent":$bytes_sent,'
'"status":"$status",'
'"upstream_time":"$upstream_response_time",'
'"upstream_host":"$upstream_addr",'
'"upstream_status":"$upstream_status",'
'"host":"$host",'
'"http_referer":"$http_referer",'
'"http_user_agent":"$http_user_agent"'
'}';
######################## default ############################
server {
listen 80;
server_name _;
access_log /data/wwwlogs/access_nginx.log combined;
root /data/wwwroot/default;
index index.html index.htm index.jsp;
#error_page 404 /404.html;
#error_page 502 /502.html;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ {
proxy_pass http://127.0.0.1:8080;
include proxy.conf;
}
location ~ ^/(\.user.ini|\.ht|\.git|\.svn|\.project|LICENSE|README.md) {
deny all;
}
location /.well-known {
allow all;
}
}
########################## vhost #############################
include vhost/*.conf;
}
+13
View File
@@ -0,0 +1,13 @@
location = /sitemap.xml {
rewrite ^(.*)$ /index.php?route=feed/google_sitemap break;
}
location = /googlebase.xml {
rewrite ^(.*)$ /index.php?route=feed/google_base break;
}
location / {
# This try_files directive is used to enable SEO-friendly URLs for OpenCart
try_files $uri $uri/ @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
+444
View File
@@ -0,0 +1,444 @@
############################################################
# #
# Configuration file for pure-ftpd wrappers #
# #
############################################################
# If you want to run Pure-FTPd with this configuration
# instead of command-line options, please run the
# following command :
#
# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
#
# Please don't forget to have a look at documentation at
# http://www.pureftpd.org/documentation.shtml for a complete list of
# options.
# Cage in every user in his home directory
ChrootEveryone yes
# If the previous option is set to "no", members of the following group
# won't be caged. Others will be. If you don't want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.
# TrustedGID 100
# Turn on compatibility hacks for broken clients
BrokenClientsCompatibility no
# Maximum number of simultaneous users
MaxClientsNumber 5000
# Fork in background
Daemonize yes
# Maximum number of sim clients with the same IP address
MaxClientsPerIP 500
# If you want to log all client commands, set this to "yes".
# This directive can be duplicated to also log server responses.
VerboseLog no
# List dot-files even when the client doesn't send "-a".
DisplayDotFiles yes
# Don't allow authenticated users - have a public anonymous FTP only.
AnonymousOnly no
# Disallow anonymous connections. Only allow authenticated users.
NoAnonymous yes
# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is "ftp". "none" disables logging.
SyslogFacility ftp
# Display fortune cookies
# FortunesFile /usr/share/fortune/zippy
# Don't resolve host names in log files. Logs are less verbose, but
# it uses less bandwidth. Set this to "yes" on very busy servers or
# if you don't have a working DNS.
DontResolve yes
# Maximum idle time in minutes (default = 15 minutes)
MaxIdleTime 15
# LDAP configuration file (see README.LDAP)
# LDAPConfigFile /etc/pureftpd-ldap.conf
# MySQL configuration file (see README.MySQL)
# MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf
# Postgres configuration file (see README.PGSQL)
# PGSQLConfigFile /etc/pureftpd-pgsql.conf
# PureDB user database (see README.Virtual-Users)
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
# Path to pure-authd socket (see README.Authentication-Modules)
# ExtAuth /var/run/ftpd.sock
# If you want to enable PAM authentication, uncomment the following line
# PAMAuthentication yes
# If you want simple Unix (/etc/passwd) authentication, uncomment this
UnixAuthentication yes
# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and
# UnixAuthentication can be used only once, but they can be combined
# together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
# the SQL server will be asked. If the SQL authentication fails because the
# user wasn't found, another try # will be done with /etc/passwd and
# /etc/shadow. If the SQL authentication fails because the password was wrong,
# the authentication chain stops here. Authentication methods are chained in
# the order they are given.
# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth
LimitRecursion 2000 8
# Are anonymous users allowed to create new directories ?
AnonymousCanCreateDirs no
# If the system is more loaded than the following value,
# anonymous users aren't allowed to download.
MaxLoad 4
# Port range for passive connections replies. - for firewalling.
PassivePortRange 20000 30000
# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
# Symbolic host names are also accepted for gateways with dynamic IP
# addresses.
# ForcePassiveIP 192.168.0.1
# Upload/download ratio for anonymous users.
# AnonymousRatio 1 10
# Upload/download ratio for all users.
# This directive superscedes the previous one.
# UserRatio 1 10
# Disallow downloading of files owned by "ftp", ie.
# files that were uploaded but not validated by a local admin.
AntiWarez yes
# IP address/port to listen to (default=all IP and port 21).
# Bind 127.0.0.1,21
# Maximum bandwidth for anonymous users in KB/s
# AnonymousBandwidth 8
# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.
# UserBandwidth 8
# File creation mask. <umask for files>:<umask for dirs> .
# 177:077 if you feel paranoid.
Umask 133:022
# Minimum UID for an authenticated user to log in.
MinUID 100
# Allow FXP transfers for authenticated users.
AllowUserFXP no
# Allow anonymous FXP for anonymous and non-anonymous users.
AllowAnonymousFXP no
# Users can't delete/write files beginning with a dot ('.')
# even if they own them. If TrustedGID is enabled, this group
# will have access to dot-files, though.
ProhibitDotFilesWrite no
# Prohibit *reading* of files beginning with a dot (.history, .ssh...)
ProhibitDotFilesRead no
# Never overwrite files. When a file whoose name already exist is uploaded,
# it get automatically renamed to file.1, file.2, file.3, ...
AutoRename no
# Disallow anonymous users to upload new files (no = upload is allowed)
AnonymousCantUpload no
# Only connections to this specific IP address are allowed to be
# non-anonymous. You can use this directive to open several public IPs for
# anonymous FTP, and keep a private firewalled IP for remote administration.
# You can also only allow a non-routable local IP (like 10.x.x.x) to
# authenticate, and keep a public anon-only FTP server on another IP.
#TrustedIP 10.1.1.1
# If you want to add the PID to every logged line, uncomment the following
# line.
#LogPID yes
# Create an additional log file with transfers logged in a Apache-like format :
# fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338
# This log file can then be processed by www traffic analyzers.
# AltLog clf:/var/log/pureftpd.log
# Create an additional log file with transfers logged in a format optimized
# for statistic reports.
# AltLog stats:/var/log/pureftpd.log
# Create an additional log file with transfers logged in the standard W3C
# format (compatible with most commercial log analyzers)
# AltLog w3c:/var/log/pureftpd.log
# Disallow the CHMOD command. Users can't change perms of their files.
#NoChmod yes
# Allow users to resume and upload files, but *NOT* to delete them.
#KeepAllFiles yes
# Automatically create home directories if they are missing
CreateHomeDir no
# Enable virtual quotas. The first number is the max number of files.
# The second number is the max size of megabytes.
# So 1000:10 limits every user to 1000 files and 10 Mb.
#Quota 1000:10
# If your pure-ftpd has been compiled with standalone support, you can change
# the location of the pid file. The default is /var/run/pure-ftpd.pid
#PIDFile /var/run/pure-ftpd.pid
# If your pure-ftpd has been compiled with pure-uploadscript support,
# this will make pure-ftpd write info about new uploads to
# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and
# spawn a script to handle the upload.
#CallUploadScript yes
# This option is useful with servers where anonymous upload is
# allowed. As /var/ftp is in /var, it save some space and protect
# the log files. When the partition is more that X percent full,
# new uploads are disallowed.
MaxDiskUsage 99
# Set to 'yes' if you don't want your users to rename files.
#NoRename yes
# Be 'customer proof' : workaround against common customer mistakes like
# 'chmod 0 public_html', that are valid, but that could cause ignorant
# customers to lock their files, and then keep your technical support busy
# with silly issues. If you're sure all your users have some basic Unix
# knowledge, this feature is useless. If you're a hosting service, enable it.
CustomerProof yes
# Per-user concurrency limits. It will only work if the FTP server has
# been compiled with --with-peruserlimits (and this is the case on
# most binary distributions) .
# The format is : <max sessions per user>:<max anonymous sessions>
# For instance, 3:20 means that the same authenticated user can have 3 active
# sessions max. And there are 20 anonymous sessions max.
# PerUserLimits 3:20
# When a file is uploaded and there is already a previous version of the file
# with the same name, the old file will neither get removed nor truncated.
# Upload will take place in a temporary file and once the upload is complete,
# the switch to the new version will be atomic. For instance, when a large PHP
# script is being uploaded, the web server will still serve the old version and
# immediatly switch to the new one as soon as the full file will have been
# transfered. This option is incompatible with virtual quotas.
# NoTruncate yes
# This option can accept three values :
# 0 : disable SSL/TLS encryption layer (default).
# 1 : accept both traditional and encrypted sessions.
# 2 : refuse connections that don't use SSL/TLS security mechanisms,
# including anonymous sessions.
# Do _not_ uncomment this blindly. Be sure that :
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
# 2) A valid certificate is in place,
# 3) Only compatible clients will log in.
# TLS 1
# Listen only to IPv4 addresses in standalone mode (ie. disable IPv6)
# By default, both IPv4 and IPv6 are enabled.
# IPV4Only yes
# Listen only to IPv6 addresses in standalone mode (ie. disable IPv4)
# By default, both IPv4 and IPv6 are enabled.
# IPV6Only yes
# UTF-8 support for file names (RFC 2640)
# Define charset of the server filesystem and optionnally the default charset
# for remote clients if they don't use UTF-8.
# Works only if pure-ftpd has been compiled with --with-rfc2640
# FileSystemCharset big5
# ClientCharset big5
+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server-xml [
<!ENTITY vhost-localhost SYSTEM "file:///usr/local/tomcat/conf/vhost/localhost.xml">
]>
<Server port="8006" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener"/>
<!--
<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="8081" rmiServerPortPlatform="8082" />
-->
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080"
protocol="org.apache.coyote.http11.Http11AprProtocol"
connectionTimeout="20000"
redirectPort="8443"
maxThreads="1000"
minSpareThreads="20"
acceptCount="1000"
maxHttpHeaderSize="65536"
disableUploadTimeout="true"
useBodyEncodingForURI="true"
enableLookups="false"
URIEncoding="UTF-8" />
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
&vhost-localhost;
</Engine>
</Service>
</Server>
+6
View File
@@ -0,0 +1,6 @@
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
+5
View File
@@ -0,0 +1,5 @@
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
}
+39
View File
@@ -0,0 +1,39 @@
location ~ /announcements/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/announcements/$1;
}
location ~ /download/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/download$1;
}
location ~ /knowledgebase/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/knowledgebase/$1;
}
location ~ /store/ssl-certificates/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/store/ssl-certificates/$1;
}
location ~ /store/sitelock/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/store/sitelock/$1;
}
location ~ /store/website-builder/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/store/website-builder/$1;
}
location ~ /store/order/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/store/order/$1;
}
location ~ /cart/domain/renew/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/cart/domain/renew$1;
}
location ~ /account/paymentmethods/?(.*)$ {
rewrite ^/(.*)$ /index.php?rp=/account/paymentmethods$1;
}
location ~ /admin/(addons|apps|domains|help\/license|services|setup|utilities\/system\/php-compat)(.*) {
rewrite ^/(.*)$ /admin/index.php?rp=/admin/$1$2 last;
}
+7
View File
@@ -0,0 +1,7 @@
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* ^/wp-content/uploads/.*\.php$ {
deny all;
}
+11
View File
@@ -0,0 +1,11 @@
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}