我正在使用默认的 apache ssl conf 文件“default-ssl.conf”
如果我使用我的自签名证书不理会它,我可以使用 443 访问该页面:
<VirtualHost _default_:443>
ServerAdmin my.email@gmail.com
ServerName myhost:443
Run Code Online (Sandbox Code Playgroud)
但是一旦我将其更改为端口 7443 并重新启动,我就无法进入该页面。我调用页面如下:
https://myip:7443/site and nothing happens but
https://myip/site works fine.
Run Code Online (Sandbox Code Playgroud)
每次我更改它时,我都会调用 apache2 重新启动。我在虚拟机中运行最新的 Debian。我不认为在 vm 中运行是问题,因为端口 443 工作正常。我已经看过了,但并没有真正看到谷歌上有任何帮助我的解决方案。我虽然将端口更改为 7443 将是我唯一需要的东西。
我运行 Debian 6 服务器并使用它来托管十几个基于 LAMP 的网站。我将其配置为在有软件更新可用时通过电子邮件发送给我,今天早上我收到了 6 个与 mySql 相关的新可用更新的通知:
mysql-server, mysql-client, mysql-common
和其他一些依赖项。我试图运行
apt-get 更新 apt-get 升级
一切顺利,直到升级过程遇到mysql-client。我得到的错误如下:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be upgraded:
mysql-client-5.5
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,772 kB of archives.
After this operation, 7,049 kB of additional disk space will be used.
Do you …Run Code Online (Sandbox Code Playgroud) 我已经ufw firewall在我的小型服务器上安装了 ssh 和 Web 服务。但是,启用后,ssh 连接丢失,我无法通过 Web 浏览器连接到托管 Web。
发生了什么事?
我正在开发一个“本地”PHP 项目。这是一个在 Debian VM 中运行的 PHP 应用程序,旨在在用户自己的 PC 上使用。
我有几个 python 脚本作为来自 /etc/init.d 的根服务运行,它们处理应用程序更新、日志、与 USB 外围设备的通信和其他内容。
编辑 1: VM 是 Turnkey Linux LAMP 映像,python 版本为 2.7.3,MySQL 5.5.47
PHP 应用程序通过 TCP 套接字与 python 服务对话,发送用户需要的特定任务的请求。
现在,我试图让用户选择让 MySQL 服务器只绑定到本地主机还是与网络上的其他用户共享。为此,我让 python 服务通过 my.cnf 文件,并注释掉 bind-address = 127.0.0.1 行,或者将其取消注释以使服务器再次本地化。
在 my.cnf 编辑之后,python 脚本调用 /etc/init.d/mysql restart 以使更改生效。
问题是,现在 mysql 最终会侦听 Python 服务正在侦听 PHP 请求的端口,如果我需要重新启动该服务,Python 会失败,声称它无法打开该端口,因为它已经在使用中。
我不明白为什么 mysql 最终会监听 python 服务使用的端口而不是 my.cnf 文件所说的 3306 。
此外,如果我通过 ssh 连接到 VM 并手动重新启动 mysql,它会返回到 3306 上的侦听,并且我可以正常启动 python 服务。
python端的一些代码:
RECV_BUFFER …Run Code Online (Sandbox Code Playgroud) 我注册了一个 Linux VPS。这个 VPS 带有一个较旧的 Linux 内核,我想升级它,因为我想运行的一些软件需要更新的版本。这是输出uname -a:
Linux florence 2.6.32-042stab120.11 #1 SMP Wed Nov 16 12:05:45 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
这是一个全新的 Ubuntu 16.04 镜像。(主机是http://ssdnodes.com)。这些是我以 root 身份按顺序运行的所有命令(这是我试图遵循的教程):
apt-get update
apt-get upgrade -y
apt-get autoremove -y
mkdir kernel_update
cd kernel_update/
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-headers-4.9.0-040900_4.9.0-040900.201612111631_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-headers-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-image-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb
dpkg -i linux-*.deb
Run Code Online (Sandbox Code Playgroud)
前两个包安装正常。当我尝试选择第三个包时,出现此错误:
Unpacking linux-image-4.8.15-040815-generic (4.8.15-040815.201612151231) ...
Setting up linux-headers-4.8.15-040815 (4.8.15-040815.201612151231) ...
Setting up linux-image-4.8.15-040815-generic (4.8.15-040815.201612151231) ...
Running depmod.
update-initramfs: deferring update (hook will be called …Run Code Online (Sandbox Code Playgroud) 我有一个可以运行文件的简短 bash 脚本。当我尝试通过“x.sh start”启动它时,会出现“必须连接到终端”的警告。如何开始?我尝试了一些 chmods 配置。这个脚本在 /usr/local/bin 我现在在 root 上,在我的 Debian 7 vps 上。
#!/bin/bash
server_start() {
screen /usr/share/s/x.sh &
}
server_stop() {
killall x.sh
killall xx
}
server_restart() {
server_stop
sleep 1
server_start
}
case "$1" in
'start')
server_start
;;
'stop')
server_stop
;;
'restart')
server_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
Run Code Online (Sandbox Code Playgroud) 我想建立一个个人服务器,在其中为自己托管各种服务(主要是 gitlab、nextcloud、NAS 和其他一些服务)。我目前采用在服务器上安装一个小型 debian 并将所有服务推送到 VM 的策略。这样服务器本身就非常稳定,即使在虚拟机出现问题时,我也始终可以通过 ssh 连接到下面的 debian。
对于我设置的最后一台服务器,我使用的是 Debian Jessie,但对于这台服务器,我不想在三月份设置机器时安装 Jessie。并在发布时升级到 Stretch(还没有发布日期,但今年夏天可能是一个不错的猜测)。例如,我读到升级 Debian 并不像升级 Ubuntu 那样容易。
所以我的想法是:我将安装stretch的测试版本。在设置服务器时,我可以忍受测试分支中的“无法”。我会直接获得新功能并可以测试它们。一段时间后,当拉伸稳定器被释放时,我想切换到它。
问题是:
我发现这里已经有一些问答关于这个话题,但没有一个能帮助我解决这个问题。我今天刚刚安装了一个 debian 8 服务器,对我的域的每个请求都被重定向到 https。现在我正在尝试为子域创建一个新的 ssl 证书,该证书失败了,因为 certbot 正在使用 http 访问 .well-known 目录。由于此请求被重定向到 https,因此无法正常工作。我的想法是从重定向中排除这个隐藏目录。
为了测试,我将一个简单的文本放入 .well-known/acme-challenge/ 目录中。每次我对这个文件发出请求时,我仍然会重定向。这是我当前的 nginx 配置:
server {
listen 80 default_server;
#listen [::]:80 default_server;
server_name test.de www.test.de;
root /var/www/html;
location /.well-known/acme-challenge {
root /var/www/html;
allow all;
}
location / {
return 301 https://test.de$request_uri;
}
}
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
include snippets/ssl-test.de.conf;
include snippets/ssl-params.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name …Run Code Online (Sandbox Code Playgroud) 我有一台旧的 (Linux 2.4.20) Debian 服务器,我忘记了 root 密码。当我尝试进入单用户模式时,一些 init 脚本永远不会退出。它使用了 LILO 引导加载程序。我想更改 root 密码,因此我尝试启动到单用户模式。但是当我尝试启动到单用户模式时,系统不会一直启动。它在尝试运行自定义 init shell 脚本时停止。它说执行....
你能告诉我我能做什么吗?我想在单用户模式切换到root密码,但现在我不敢重新启动它,因为Crtl+ Alt+Delete不重新启动的启动过程中的工作。
我尝试在 Debian 8.9 上安装一些库
apt-get install libnice-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libc6-dev : Breaks: binutils (< 2.26) but 2.25-5+deb8u1 …Run Code Online (Sandbox Code Playgroud)