is nil, So you need to initialize with the Make method, and the program will output ' map is nil '. Going to make one. # # Add elements to map the syntax and arrays for adding new elements to the map are the same. The following program adds several new elements to the ' personsalary ' map. "' Gopackage mainimport (" FMT ") func main () {personsalary: = Make (Map[string]int) personsalary[" Steve "] = 12000personsalary["Jamie" = 15000personsalary["Mike"] = 9000fmt. PRINTLN ("Personsalary Map cont
.
echo -n "yourpassword" | base64eW91cnBhc3N3b3Jk
apiVersion: v1kind: Secretmetadata: name: drone-secrets namespace: devopsdata: server.secret: eW91cnBhc3N3b3Jk
The next step is Drone-server's deployment and service and ingress. Here for the sake of simplicity, with the SQLite database, the real production environment is recommended for MySQL or pgsql. Even with SQLite, it should be mounted to ceph to ensure data security. Here directly Hostpath. In k8s, the separation of storage and computat
) Installation and configuration of Nginx.The downloaded nginx-1.0.4 package is also extracted to the D-disk Wnmp directory, and renamed Nginx. Next, let's configure Nginx to work with PHP. Enter the Nginx conf directory, open the Nginx configuration file nginx.conf, findLocation/ {root HTML; # Here is the root directory of the site index index.html index.htm;}The root HTML will be changed to root d:/wnmp/www;Go down and find # pass the PHP scripts to FastCGI server Listening on 127.0.0.1:
=Php_mysql.dll; extension=php_mysqli.dll ... Wait, wait, get rid of all the extensions you want . PHP load extensions need to be aware of dependencies, such as Php_exif.dll needs Php_mbstring.dll, you have to put Php_mbstring.dll in front of the Php_exif.dll to load successfully.Next, let's configure PHP so that PHP can be combined with nginx. Find and remove comments from the following lines (that is, remove the beginning semicolon)111This step is very important, here is the CGI settings f
,Change:
1
Cgi. fix_pathinfo = 1;
This wayPhp-cgiCan be used normallySCRIPT_FILENAMEThis variable.(3 ).Open/Etc/nginx/sites-available/defaultFILE In
123
Server {listen 80; server_name localhost;
AddWebAbsolute root directory address,Here we useNginxDefault address
1
Root/var/www/nginx-default
That isRootAndServer_nameThe same level is equivalentApacheDefault directoryIf not,Easy to executePhpFile,Will prompt"No input file specified".I used to
php. I searched google baidu, I didn't find an introduction to monitoring php in Chinese, so I was not idle. I simply transformed a template to monitor the working conditions of php-fpm. I believe many people in China may have used it for a long time, but they have no time to say it.
The so-called transformation is not my original. Original author address inHttp://forums.cacti.net/viewtopic.php? F = 12 amp; t = 41580After downloading this template, I tried it and found that it was not so easy
php-cgi -b 127.0.0.1:9000
PHP-CGI deficiency
1. after php-cgi changes the php. ini configuration, restart php-cgi to make the new php-ini take effect.
2. directly kill the php-cgi process, and php cannot run. (PHP-FPM and Spawn-FCGI don't have this problem, and the daemon will smoothly generate new sub-processes .)
What is PHP-FPM
PHP-FPM is a PHP FastCGI manager that is only used for PHP and can be downloaded at http://php-fpm.
... Although Apache supports ah ... index index.html Index.htm index.php; #注意这里添加了index. php, if not added this has the potential to report 403 error, this is win under, Linux or other system will have this problem unknown. AutoIndex on; #如果文件不存在, List directory tree structure } #error_page 404 /404.html;# Redirect Server error pages to the static page /50x.html# Error_page 500 502 503 504 /50x.html;location =/ 50x.html {root html; }# Proxy The PHP Scripts to Apache listening on 127.0.0.1:80#
line Location/{ root html; Index index.html index.htm;}Modify the path to the Web site file, and add the default page for index.php. Location/ { root C:/wnmp/nginx/html; Index index.html index.htm inde.php; }2. Support for PHP settingsModified about the 第63-71 line.# Pass the PHP scripts to FastCGI server listening on127.0.0.1:9000# #location~\.php$ {# root HTML; # Fastcgi_pas
Modify the listening mode of PHP for the listening port Input Vim/etc/php5/fpm/pool.d/www.conf Find rows Listen =/var/run/php5-fpm.sock Add a semicolon to the front; Comment out this line Then add a new line below Listen = 127.0.0.1:9000 Represents a 9000 port that listens on this machine Save and exit Edit Input Service PHP5-FPM Restart Restart PHP5-FPM (what is PHP5-FPM?) Manage PHP stuff, specifically o
a single developer with a static IP Address
Xdebug is used for remote debugging. Xdebug acts as a program embedded in PHP and acts as a client, while IDE acts as a server. The following dynamic diagram shows the connection creation process.
The IP address of the server is 10.0.1.2. the HTTP protocol is used and the port is 80.
IDE is on a machine with the IP address 10.0.1.42,xdebug.remote_hostSet to 10.0.1.42
The IDE listens to port 9000. T
, the fiber channel switch. Scalability not only refers to the capacity for increasing network bandwidth, but also whether to use the number of ports of existing fiber channel switches to effectively build a large-scale storage network. With the increasing demand for storage networks, users urgently need a high-performance, powerful storage network platform that can meet the bandwidth and port quantity requirements by scaling. Such a platform must be able to provide investment protection, that i
.
Reload is a very important parameter. It can reload the modified PHP without interrupting the FastCGI process in php. you can use php-fpm to smoothly change the PHP settings in FastCGI mode.
After the FastCGI process is started, its listening IP address and port are also started. You can view related information through ps and netstat.
# Netstat-antl | grep 9000
# Ps-ef | grep php-cgi
4. Configure Nginx to support PHP
1. Configure/etc/nginx/conf.
/manual/zh/install.fpm.configuration.phphttp://php.net/ manual/zh/install.fpm.phphttp://segmentfault.com/q/10100000002565162. nginx file type Error parsing vulnerability0x1: Vulnerability DescriptionVulnerability Description: Nginx is a high-performance Web server, the use of a very broad, not only often used as a reverse proxy, but also very good support for PHP operation. However, there is a serious security problem, which by default may cause server errors to parse any type of file in PHP, wh
root directory address,Here we useNginxDefault address
1
Root/var/www/nginx-default
That isRootAndServer_nameThe same level is equivalentApacheDefault directoryIf not,Easy to executePhpFile,Will prompt"No input file specified".I used to go around a large circle to find out the problem..Then modify
123456
# Location ~ . Php $ {# fastcgi_pass 127.0.0.1: 9000; # fastcgi_index index. php; # fastcgi_param SCRIPT_FILENAME/scri
option, changed to 1cgi. fix_pathinfo = 1; so that php-cgi can use SCRIPT_FILENAME normally This variable. (3 ). open the/etc/nginx/sites-available/default file and add the absolute address of the web root directory under 123 server {listen 80; server_name localhost, here we use the default nginx address 1 root/var/www/nginx-default, that is, the same level of root and server_name, which is equivalent to the default directory of apache, it is easy to prompt "No input file specified" when execut
is a high-performance Web server, the use of a very broad, not only often used as a reverse proxy, but also very good support for PHP operation. However, there is a serious security problem, which by default may cause server errors to parse any type of file in PHP, which will lead to serious security issues that could allow a malicious attacker to compromise an nginx server that supports PHP.
0x2: Vulnerability Analysis
the corresponding directory and configure the environment variables:
sonar_scanner_home:d:\sonar\sonar-scanner-2.8\sonar-scanner-2.8
Path:%sonar_scanner_home%\bin
To configure the Conf/sonar-scanner.properties file:
#-----Default SonarQube ServerSonar.host.url=http://localhost:9000/#-----Default Source Code encodingSonar.sourceencoding=utf-8#-----Global Database Settings (not used for SonarQube 5.2+)Sonar.jdbc.username=sonarSona
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.