Category: Nginx
-
Post Views: 19 1. Enter the CentOS server based on Xshell 6, compress and package the website program directory, execute the compression command, and the execution result is shown in Figure 1 2. Connect to the FTP server based on FlashFXP, download the compressed package: shuijingwanwq.com-20191203.zip to the local, as shown in Figure 2 3. Connect to the MySQL server…
-
Post Views: 13 1. In the Docker container, the Nginx PHP environment responds to 404 not found, and opens a route mapped to the PHP file, as shown in Figure 1 2. Open a route mapped to an HTML file and respond to 200, as shown in Figure 2 3. The configuration file of nginx, the content is as follows…
-
Post Views: 16 1. In nginx 1.10 version, an error is reported when reloading: nginx:[warn]Could not build optimal server_names_hash, as shown in Figure 1 2. Check the nginx configuration file, C:\nginx-1.10.1\conf\nginx.conf 3. Check the virtual host configuration file, C:\nginx-1.10.1\conf\vhosts\channel-pub-api-wx-auth.conf 4. Reference URL:https://nginx.org/en/docs/http/server_names.html, according to the error message, it should be caused by the definition of a large number of server…
-
Post Views: 13 1. Open the URL:http://www.aaaacn.net/wp-admin/install.php,报错:HTTPError 500, as shown in Figure 1 2. Open the URL:http://www.aaaacn.net/phpinfo.php,正常运行,如图2 3. Check virtualhost conf: /usr/local/nginx/conf/vhost/www.aaaacn.net.conf 4. Check rewrite rule: /usr/local/nginx/conf/rewrite/wordpress.conf 5. Check the directory permissions, and find that the files in the WordPress directory, permission users and user groups are no longer WWW, but root, it should be because the files in the…
-
Post Views: 8 1. When executing .\nginx -s reload, prompt: nginx:[emerg]host not found in upstream ‘api.aims-api.localhost’ in c:/nginx-1.10.1/conf/vhosts/aims.conf:14, as shown in Figure 1 2. Check lines 13, 14, and 15 of c:/nginx-1.10.1/conf/vhosts/aims.conf 3. Check C:\Windows\System32\drivers\etc\hosts and find that 127.0.0.1 api.aims-api.localhost has been deleted because of the Windows 10 upgrade 4. Overwrite the previously backed up hosts file to C:\Windows\System32\Drivers\etc\hosts, as…
-
Post Views: 15 1,http://wmpublish.mp.sztv.com.cn:8026/wx/robots.txt, the response is successful, indicating that the configuration of nginx is correct 2,http://wmpublish.mp.sztv.com.cn:8026/v1/channel-app-sources?group_id=channel, the response failed, no input file specified 3. Run the command in the container and view the nginx error log, as shown in Figure 1 4. Run the command in the container, check the contents of the file, and find that the file…
-
Post Views: 13 1. There are 3 applications in the directory structure at this stage, namely: Frontend, Backend, and API, and their domain names are configured as :http://www.channel-pub-api.localhost/,http://www.channel-pub-api.localhost/backend,http://www.channel-pub-api.localhost/api 2. Edit the hosts file 3. Reference:https://github.com/mickgeek/yii2-advanced-one-domain-config/blob/master/vhosts/nginx.conf, edit \frontend\config\main.php 4. Edit \backend\config\main.php, set the baseURL, separate session and cookie 5. Edit \api\config\main.php 6. Edit \api\config\urlmanager.php 7. Edit \environments\dev\frontend\web\robots.txt, \environments\prod\frontend\web\robots.txt Before editing: After…