Le porte principali per accedere al Pannello Web di CentOS sono 2030 e 2031. Ultimamente, il Pannello Web di CentOS utilizza anche le porte 2086/2087 e 2082/2083 (simili a WHM). Per riassumere:
Interfaccia del pannello di amministrazione Web di CentOS | 2030 o 2086 |
Interfaccia sicura del Pannello di amministrazione Web di CentOS | 2031 o 2087 |
Interfaccia del pannello utente Web di CentOS | 2082 |
Interfaccia sicura del Pannello utente Web di CentOS | 2083 |
Queste porte sono configurate nel file /usr/local/cwpsrv/conf/cwpsrv.conf . Puoi controllare questo file tramite riga di comando con un'utilità come nano o tramite CentOS Web Panel File Manager. Il contenuto di cwpsrv.conf il file è:
worker_processes 2; events { worker_connections 2048; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server_tokens off; client_max_body_size 128M; access_log logs/access_log; server { listen 2030; listen 2086; server_name localhost; location / { root /usr/local/cwpsrv/htdocs/admin; index index.html index.htm index.php; ModSecurityEnabled off; ModSecurityConfig /usr/local/cwpsrv/conf/security/conf/global_rules.conf; # Includes include /usr/local/cwpsrv/conf/cwp_rewrite.conf; include /usr/local/cwpsrv/conf/cwp_services.conf; include /usr/local/cwpsrv/conf/include/*.conf; include /usr/local/cwpsrv/conf/cwp_panels.conf; location ~ \.php$ { try_files $uri =404; root /usr/local/cwpsrv/htdocs/admin; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_read_timeout 600; fastcgi_pass unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; include fastcgi_params; } } } server { listen 2031; listen 2087; server_name localhost; ssl on; ssl_session_timeout 90m; ssl_certificate /etc/pki/tls/certs/hostname.crt; ssl_certificate_key /etc/pki/tls/private/hostname.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; error_page 497 https://$host:2087$request_uri; location / { root /usr/local/cwpsrv/htdocs/admin; index index.html index.htm index.php; ModSecurityEnabled off; ModSecurityConfig /usr/local/cwpsrv/conf/security/conf/global_rules.conf; # Includes include /usr/local/cwpsrv/conf/cwp_rewrite.conf; include /usr/local/cwpsrv/conf/cwp_services.conf; include /usr/local/cwpsrv/conf/include/*.conf; include /usr/local/cwpsrv/conf/cwp_panels.conf; location ~ \.php$ { try_files $uri =404; root /usr/local/cwpsrv/htdocs/admin; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_read_timeout 600; fastcgi_pass unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; include fastcgi_params; } } } include /usr/local/cwpsrv/conf.d/*.conf; }
Per reindirizzare le porte non sicure verso porte sicure, aggiungi le seguenti righe al file /usr/local/apache/htdocs/.htaccess
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
CentOS Web Panel utilizza le porte standard per servizi come il server di posta elettronica, SSH ecc. :
SSH | 22 |
FTP | 21 |
SMTP | 25/26 |
SMTP protetto | 465 |
POP3 | 110 |
Pop3 sicuro | 995 |
MySQL | 3306 |
IMAP | 143 |
IMAP sicuro | 993 |
HTTP/HTTPS | 80/443 |
Articolo KB correlato: Come installare nano editor con yum