English | 简体中文
IE / Edge |
Firefox |
Chrome |
Safari |
Opera |
Electron |
---|---|---|---|---|---|
IE9, IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
A succinct, fast and elegant Airport
Centos 7
install lnmp1.4
Download and install the LNMP one-click installation package
- Add a virtual host to add ssl support as needed.
yum install screen -y
screen -S lnmp
wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz
cd lnmp1.4 && ./install.sh lnmp
lnmp vhost add
- Remove anti-cross directory removal tool This tool can quickly remove the anti-cross directory restrictions
cd lnmp1.4/tools
./remove_open_basedir_restriction.sh
When prompted, enter the virtual host directory /home/wwwroot/yourdomain press Enter to confirm.
- Turn on the scandir() function
sed -i 's/,scandir//g' /usr/local/php/etc/php.ini
- Modify conf
vi /usr/local/nginx/conf/vhost/yourdomain.conf
- Add this to the server
location /
{
try_files $uri $uri/ /index.php$is_args$args;
}
- Modify the root line
root /home/wwwroot/yourdomain/public;
- Sample conf
server
{
listen 80;
server_name yourdomain;
return 301 https://$host$request_uri;
}
server
{
listen 443 ssl;
server_name yourdomain;
ssl_certificate /etc/letsencrypt/live/yourdomain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain/privkey.pem;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/yourdomain/public;
include other.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
access_log /home/wwwlogs/yourdomain.log;
- Download panel program
cd /home/wwwroot/yourdomain
yum install git -y
git clone -b master https://github.com/ioslide/ssrpanel_mod.git tmp && mv tmp/.git . && rm -rf tmp && git reset --hard
chown -R root:root *
chmod -R 755 *
chown -R www:www storage
php composer.phar install
mv tool/alipay-f2fpay vendor/
mv -f tool/autoload_classmap.php vendor/composer/
- Configuration database Login database
mysql -u root -p
mysql>CREATE DATABASE database_name;
mysql>use database_name;
mysql>source /home/wwwroot/yourdomain/sql/all.sql
- Configuring sspanel
cd /home/wwwroot/yourdomain
cp config/.config.php.example config/.config.php
vi config/.config.php
lnmp restart
php xcat createAdmin //Create an Administrator
php xcat syncusers //Synchronous user
php xcat initQQWry //Download IP parsing library
php xcat resetTraffic //Reset traffic
Execute the crontab -e command and add the following five segments.
30 22 * * * php /home/wwwroot/your-site-folder/xcat sendDiaryMail
*/1 * * * * php /home/wwwroot/your-site-folder/xcat synclogin
*/1 * * * * php /home/wwwroot/your-site-folder/xcat syncvpn
0 0 * * * php -n /home/wwwroot/your-site-folder/xcat dailyjob
*/1 * * * * php /home/wwwroot/your-site-folder/xcat checkjob
*/1 * * * * php -n /home/wwwroot/your-site-folder/xcat syncnas