1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

When the detection of joining the HSTS preload list fails

You should click the configuration button of the corresponding website

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Then click Profile

Find a line similar to the following

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

After entering the content, click Next to automatically locate the line

Please focus on whether the Bank has "includeSubdomains"; "Preload", and whether the number after the max age equal sign is greater than 31536000 (1 year, but 63072000 is recommended)

If 1Panel updates other native compatible web servers in the future (instead of community shells such as ols), please refer to this article to make configuration changes to the corresponding web servers

After accessing CDN and WAF, you will be prompted that there are too many page redirects

Please try to configure the upstream (back to source) server of CDN and WAF as https address first

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

The above figure is an example of the WAF of the minepit

If it still doesn't work, try changing this to "http can be accessed directly"

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

403 error occurred after migrating from other environments to 1Panel

Please check carefully whether the root directory of your website contains a file called ". user. ini",

If yes, delete it because it may contain the wrong execution location restriction path

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial
 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Whether the 1Panel can coexist with the pagoda

Yes, you can install 1Panel and pagoda on the server at the same time, you can also install pagoda in 1Panel, or you can install 1Panel in 1Panel

But the premise of doing so is that you have introduced a third-party app store

Why is storage space less and less

It may be that unused docker images occupy a lot of space

1. Unused image

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

2.1 Panel Docker Overlay2 occupies a large amount of disk space

1Panel failed inexplicably when applying for a certificate

This method is mostly because the site is accessed by a reverse proxy. The solution is not to generate a certificate on the server, but to use a third-party service

Multiple running environments with the same PHP version but different extensions are required

This operation is not feasible on the pagoda, but 1Panel can do this

If your application a needs PHP80+extension X, and your application b needs PHP80+extension Y, but extension X and extension Y do not support coexistence, then you can use two operating environments

You only need to modify the image name when creating the running environment

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

The two running environments after creation are independent of each other

The required extension is not in the official support list

According to the official document, if the PHP extension you are looking for is not in the extension selection list, you can manually enter it and select the first one

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

If the extension "zip" is not in this list, I can manually enter the zip and select the first one

Why should you fill in the PHP-FPM port when creating a website

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

A novice may ask, is this the access port of my website? Do I need to reverse proxy this port?

None. This is the port used by the web server to communicate with PHP. The pagoda uses socket connection by default, so you can't see this setting at all. The 1Panel uses TCP connection, so this port is needed to allow PHP to communicate with the web server

Can I only use openrest
The only web server officially supported and available by the 1Panel is openresty

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Although there is an official ols web server, it was moved from the community and no adaptation was made. You need to write configuration files for ols, compile lsphp, etc., and any operation in 1Panel cannot be synchronized into ols

Of course, you can use nginx, openrest, tengine and other nginx based web servers (or web servers that are fully compatible with nginx configuration files)

First, you need their docker image, but I suggest using docker file to build one and add lua module

Then find the docker container of openresty and click Edit

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Then select the image you just built and click OK to complete the replacement

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Container editing requires rebuilding the container

In fact, some operations do not need to be rebuilt, but use the update statement

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Evidence: The unpersistent data is not lost, and the changes take effect, and the running time is normal (there is no obvious restart trace such as starting a few seconds ago)

MySQL, Redis, etc. cannot be connected

Most of them appear in PHP website projects or in any 1Panel application

This is because all docker deployed applications in 1Panel will be classified into a bridge network named 1Panel network by default

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

In addition, 1Panel has specified the host name when creating containers such as databases, so it needs to connect through mysql: 3306, redis: 6379 instead of using a loopback IP such as 127.0.0.1. Because the loopback IP is only relative to the container where the running environment is located, not to the host, the connection cannot be established

Openresty is a special application. By default, it is the host network, that is, it shares an IP address with the server host, but this sharing is not NAT (network address translation) sharing IP, but allows the processes in the container to directly obtain the same network permissions as the host, and can directly occupy the host network port, and directly use the host IP address, So 127.0.0.1 can be used in reverse proxy

Cannot use mysql: 3306 as the database connection address

This problem usually occurs in some projects. The reason is that the verification logic of the project believes that MySQL is not a valid network address. For example. com, like 127.0.0.1, it is a valid network address. We can fill in the IP address of MySQL

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial

Find your MySQL container, and you can see its intranet IP address in the bridge network. Use this address to connect (but it is unstable and vulnerable to interference from external factors, such as the container is started in an abnormal order)

If you do not want to use this method, you can change your application to a host network, so that you can use a loopback IP such as 127.0.0.1 to connect

No file found when using server level cron instead of wp cron

You may have filled in the cron directory incorrectly

/Opt/1panel/apps/openresty/openresty/www/sites/website domain name/index/wp-cron.php

Although this is the correct website directory, it is mapped from the container. When you execute cron in the container, you cannot find this path

The correct method is to select the PHP container where the website is located when using cron, and use the following execution command

 1Panel Pit Avoidance/Use Guide - more useful than the official 1Panel tutorial
 Php/www/sites/website domain name/index/wp-corn.php

Original article by Mo Tao, if reproduced, please indicate the source: https://imotao.com/8586.html

fabulous (0)
 Head of Mo Tao Mo Tao
Previous 5:22 p.m., May 3, 2024
Next 7:24 p.m., May 3, 2024

Related recommendations

Post reply

Your email address will not be disclosed. Required items have been used * tagging

This site uses Akismet to reduce spam comments. Learn how we handle your comment data