我在 Ubuntu 服务器上丢失了我的 root/超级用户密码。我尝试以恢复模式启动并选择 option drop to root shell
。
但它总是要求:
Give root password for maintenance (or type Control-D to continue)
Run Code Online (Sandbox Code Playgroud)
我不记得了。
在我的网站上,我有一些验证文件,我需要将其放入没有扩展名的文档根目录中,只有“验证文件”,
但是当我尝试从浏览器打开它时,它会下载而不是打开,所有其他扩展名为 (.txt) 的文件都可以正常打开,
我的 nginx (1.12) 配置:
server {
listen 80;
listen 443 ssl;
root /var/www/website;
error_log /var/log/nginx/website-error.log;
access_log /var/log/nginx/website-access.log;
index index.php index.html index.htm index.nginx-debian.html;
server_name website.com;
ssl_certificate /etc/ssl/website/nginx_bundle.crt;
ssl_certificate_key /etc/ssl/website/website.key;
location / {
index index.php index.html;
try_files $uri $uri/ =404 /index.php?q=$uri&$args;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
root /var/www/website;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/website/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
# deny access to .htaccess files, if …
Run Code Online (Sandbox Code Playgroud) 我的服务器上当前启用的 TLS 是“tls 1”,如何在我的 ubuntu 服务器上启用 tls 1.2,我是否必须先升级我的 openssl?
# apache2ctl -v
Server version: Apache/2.2.12 (Ubuntu)
# openssl version -a
OpenSSL 0.9.8g 19 Oct 2007
built on: Fri Dec 3 23:05:00 UTC 2010
platform: debian-amd64
options: bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) blowfish(ptr2)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int -DMD5_ASM
Run Code Online (Sandbox Code Playgroud) 我刚刚在 Ubuntu 16.04 上安装新的邮件服务器,开始安装和配置 postfix 和 mysql,:
apt install postfix postfix-mysql mysql-server mysql-client
Run Code Online (Sandbox Code Playgroud)
在配置 postfix (3.1) 并为邮件创建 db base 后,我尝试测试 postfix 是否可以访问 db 并检索所有域/用户:
postmap -q mydomain.com mysql:/etc/postfix/mysql-virtual_domains.cf
Run Code Online (Sandbox Code Playgroud)
我得到了错误:
postmap: fatal: unsupported dictionary type: mysql
Run Code Online (Sandbox Code Playgroud)
似乎我的服务器由于某种原因不支持 mysql!
# postconf -m
btree
cidr
environ
fail
hash
inline
internal
memcache
nis
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix
/etc/postfix# cat dynamicmaps.cf
# dict-type so-name (pathname) dict-function mkmap-function
cdb postfix-cdb.so.1.0.1 dict_cdb_open mkmap_cdb_open
ldap postfix-ldap.so.1.0.1 dict_ldap_open
mysql postfix-mysql.so.1.0.1 dict_mysql_open
pcre postfix-pcre.so.1.0.1 …
Run Code Online (Sandbox Code Playgroud) 如果我尝试通过 ssh 或 telnet 连接到 Ubuntu 服务器,并且两个连接都被拒绝或拒绝!
我可以ping通服务器,关闭防火墙。
我应该采取哪些故障排除步骤?
(我离服务器很远,所以控制台解决方案不可用)。