AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-14896

John's questions

Martin Hope
learningtech
Asked: 2024-04-13 01:32:06 +0800 CST

nginx 的位置块配置错误?一直显示404

  • 7

我对 nginx 很陌生。http://192.168.0.37/hls当我访问或访问时,我收到 404 not found http://192.168.0.37/hls/。

这是我的/etc/nginx/nginx.conf文件:

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;


        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
        server {
        listen 80 default_server;
        listen [::]:80 default_server;
        server_name _;

        root /var/www/html;
        index index.html;

        location /hls {
                root /var/www/html;
                index testtest.html;
            }
        }
}

我的目录里没有任何东西/etc/nginx/sites-enabled/。两个文件/var/www/html/index.html和/var/www/html/testtest.html均由其拥有www-data并具有755权限。

/var/www/html/testtest.html为什么我访问http://192.168.0.37/hls或时看不到内容http://192.168.0.37/hls/?


然而,我能够看到http://192.168.0.37/testtest.html

nginx
  • 1 个回答
  • 59 Views
Martin Hope
John
Asked: 2024-01-31 06:23:10 +0800 CST

Apache 表示证书对 192.168.0.44 无效,但对 192.168.0.44 有效

  • 5

我在为 Apache 提供服务的网站创建 SSL 证书时遇到问题。当我https://192.168.0.44通过 FireFox 访问时,收到错误消息:

Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for 192.168.0.44. The certificate is only valid for 192.168.0.44.
 
Error code: SSL_ERROR_BAD_CERT_DOMAIN

以下是重现该问题的步骤。

要求:

  • 一台 IP 地址上装有 Ubuntu 操作系统的计算机192.168.0.44。
  • 任何地址上装有 Windows 的一台计算机192.168.0.*。

脚步:

我转到 Ubuntu 机器。

我运行这个命令:

mkdir -p /etc/certs/test;

/etc/certs/test/entity.cnf我创建包含以下内容的文件:

[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = CA
ST = ON
L = Windsor
O = Ankle
OU = Hello
CN = 192.168.0.44
[v3_req]
keyUsage = critical, digitalSignature, keyAgreement
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = 192.168.0.44

我创建一个名为/etc/certs/test/make-certs.sh以下内​​容的文件。

#!/bin/bash

ORG="ABTEST"
CN="abtest"
certdir="/etc/certs/test"

mkdir -p $certdir;
cd $certdir;

## Create certificate authority
openssl genrsa -out $certdir/ca.key 2048
openssl req -x509 -sha256 -nodes -key $certdir"/ca.key" -subj "/C=CA/ST=ON/O="$ORG"/CN="$CN -days 3650 -out $certdir"/ca.crt"

## Create entity certificate

# Private Key
openssl genrsa -out $certdir/entity.key 2048
# CSR
openssl req -new -sha256 -nodes -key $certdir"/entity.key" -config $certdir"/entity.cnf" -out $certdir"/entity.csr"
# Certificate
openssl x509 -req -in $certdir"/entity.csr" -CA $certdir"/ca.crt" -CAkey $certdir"/ca.key" -CAcreateserial -out $certdir"/entity.crt" -days 500 -sha256 -extensions v3_req -extfile $certdir"/entity.cnf"

我运行命令:

./make-certs.sh

我用这个命令安装 Apache2。

apt-get install -y apache2;

我创建了一个/etc/apache2/sites-available/default-ssl.conf包含以下内容的:

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html
                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined
                SSLEngine on
                SSLCertificateFile      /etc/certs/test/entity.crt
                SSLCertificateKeyFile /etc/certs/test/entity.key
                SSLCACertificateFile /etc/certs/test/ca.crt
                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>
        </VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

我运行这些命令:

a2enmod ssl;
a2ensite default-ssl.conf;
systemctl restart apache2;

我运行这个命令:

cat /etc/certs/test/ca.crt

我复制输出。

我转到 Windows 计算机。

我将剪贴板内容粘贴到名为 的 txt 文件中ca.crt。

我转到 FireFox 设置并ca.crt作为证书颁发机构导入。

我https://192.168.0.44用FireFox访问。

我看到这个问题开头提到的错误消息。


但是,如果我重复上述步骤但仅更改 3 件事,则不会收到此错误:

  • 在我的 Ubuntu 机器上,我将所有实例替换192.168.0.44为hello.test.com/etc/certs/test/entity.cnf

  • 在我的 Windows 计算机上,我将这一行添加192.168.0.44 hello.test.com到文件中C:\Windows\System32\drivers\etc\hosts。

  • 在我的 Windows 计算机上,我https://hello.test.com使用 FireFox 网络浏览器进行访问。

经过这 3 项更改后,FireFox 将显示一个绿色的锁定图标,并表示我的 SSL 证书的一切都很完美。

如何解决我的情况,以便192.168.0.44可以使用可验证且可信的证书?


附加说明:

https://192.168.0.44这就是当我访问Apache 使用证书时FireFox 所说的内容192.168.0.44 在此输入图像描述

apache-2.2
  • 1 个回答
  • 27 Views
Martin Hope
John
Asked: 2022-04-11 08:38:35 +0800 CST

srv 记录的有效区域名称或有效服务名称是什么?

  • 1

我一直在关注一些关于如何使用 A 记录和 SRV 记录将域映射到特定 ip 和端口的指南/问题,例如1.1.1.1:1889:

https://stackoverflow.com/questions/11433570/how-to-use-srv-or-any-other-record-do-redirect-a-domain

https://stackoverflow.com/questions/19015138/how-to-redirect-dns-to-different-ports

在上述问题中,他们建议使用 SRV 记录。我唯一不清楚的部分是如何确定service在我的 SRV 记录中使用的正确名称?例如,假设我有这些记录

mysql.example.com.  86400 IN A 1.1.1.1
mongo.example.com.  86400 IN A 1.1.1.1
www.example.com.  86400 IN A 1.1.1.1
mosquitto.example.com.  86400 IN A 1.1.1.1
_mysql._tcp.example.com. 86400 IN SRV 10 20 3306 mysql.example.com.
_mongo._tcp.example.com. 86400 IN SRV 10 20 27017 mongo.example.com.
_http._tcp.example.com. 86400 IN SRV 10 20 3306 www.example.com.
_mqtt._tcp.example.com. 86400 IN SRV 10 20 3306 mosquitto.example.com.

我的 SRV 记录中使用的服务名称是否_mysql, _mongo, _http and _mqtt正确? 我完全猜到了这些服务名称,因为我找不到列出所有可以使用的可接受服务名称的网站。

domain-name-system srv-record
  • 1 个回答
  • 141 Views
Martin Hope
John
Asked: 2021-01-14 15:07:07 +0800 CST

php 不允许我执行 `shell_exec('git pull origin master 2>&1');`

  • 0

当我运行脚本<?php chdir('/var/www/html'); echo shell_exec('git pull origin master 2>&1'); ?>时,我收到错误消息:

error: cannot open .git/FETCH_HEAD: Permission denied

这是我所做的:

ssh [email protected]
pwd # shows that I'm already at /var/www as my home directory
ls .ssh/ # shows that I have id_rsa and id_rsa.pub, and id_rsa.pub is given to github
cd html
git pull origin master # everything downloads perfectly
echo "<?php chdir('/var/www/html'); echo shell_exec('git pull origin master 2>&1'); " > pull.php

现在当我去http://example.com/pull.php我得到错误cannot open .git/FETCH_HEAD: Permission denied。

为了确认我的权限,我以 root 身份登录以执行chown -R apache:apache /var/www. 我的也有这个/etc/passwd

apache:x:48:48:Apache:/var/www:/bin/bash

我究竟做错了什么?

centos php git
  • 1 个回答
  • 450 Views
Martin Hope
John
Asked: 2020-03-19 10:19:06 +0800 CST

SSL 不适用于 Chrome,但适用于所有其他浏览器

  • 0

我的一个朋友(不是技术人员)将 Web 应用程序的 API 从 azure 迁移到了 Liquidweb。使用 FireFox 和 Edge 的用户可以正常浏览该网站。但是使用 Chrome 的用户会遇到 SSL 问题。当我使用 Chrome 访问 api urlhttps://api.example.com时,我注意到地址栏给出了一个感叹号,而不是通常的锁定图标。点击感叹号给出了典型的Your site connection is not secure message。同样,这在 FireFox 或 Edge 中不是问题。

我查看了我朋友的 IIS 设置,如下所示:

在此处输入图像描述

并且证书的详细信息都是“绿色图标”,除了key usage和basic constraints显示在这里

在此处输入图像描述 在此处输入图像描述

我个人在 bluehost.com 共享主机上托管了其他网站,这些网站使用 linux、nginx,让我们加密显示相同设置key usage且basic constraints没有相同问题的 ssl。

我朋友的 SSL 设置有什么问题可能会导致 Chrome 出现问题?


额外的

这是我在 Chrome 中看到的内容:

在此处输入图像描述

此外,我朋友的服务器在 IIS 版本 10 的 build 1607 上使用 Windows Server 2016。


附加 2

FireFox 显示 Subject Alt Name 与 Common name 相同。截图在这里:

在此处输入图像描述


附加 3

此外,这是来自https://sslshopper.com/ssl-checker.html的验证检查

在此处输入图像描述

iis ssl-certificate
  • 2 个回答
  • 3258 Views
Martin Hope
John
Asked: 2020-01-17 13:57:48 +0800 CST

当目标缺少子目录时,“转换”命令出现问题

  • 0

我有一个名为src完整的子目录和其他图像的目录。我尝试使用一个 bash 语句自动将它们全部调整到另一个目标目录,thumb如下所示:

find ./src -type f -follow -iname '*.jp*g' -exec convert -resize 150x150x "{}" "./thumb/${size}/{}" \;

这不起作用,因为该thumb目录最初是空的,并且没有与src.

我试图查找,man convert但似乎找不到自动创建目录的选项convert。将我的所有图像转换为thumb目录中的缩略图大小的有效方法是什么?我需要预先创建拇指中的所有子目录吗?


编辑

我在上面的命令之前是这样的:

find ./src -type d -follow -exec mkdir -p "thumb/${size}/{}" \;

但是我很好奇我是否能够用一个命令而不是两个命令来完成所有事情?

bash
  • 1 个回答
  • 21 Views
Martin Hope
John
Asked: 2020-01-17 12:13:16 +0800 CST

使用 find、exec 和 cp 复制特定文件,同时保留目录路径

  • 0

我使用空文本文件设置了以下文件夹:

1/a.txt
2/b.txt

我只想将 txt 文件复制到另一个目录,同时保持它们的目录结构。所以我尝试了以下命令:

mkdir -p temp/s;
find ./ -name '*txt' -exec cp --parents '{}' ./temp/s \;

现在我从当前目录中看到以下文件:

1/a.txt
2/b.txt
temp/s/1/a.txt
temp/s/2/b.txt
temp/s/temp/s/2/b.txt

我不明白为什么最后一行会temp/s/temp/s/2/b.txt出现。有人可以向我解释为什么会发生这种情况以及如何修复我的命令以使其temp不嵌套在另一个命令中temp吗?

这是我期待的最终结果:

1/a.txt
2/b.txt
temp/s/1/a.txt
temp/s/2/b.txt
find
  • 1 个回答
  • 1039 Views
Martin Hope
John
Asked: 2019-12-08 09:04:59 +0800 CST

从 find 和 xargs 中删除 -print0 和 -0 标志

  • 2

差不多10年前,我问过这个问题

在linux中递归使用SED?

并得到了这个有用的命令find . -type f -print0 | xargs -0 sed -i 's/regex_search_term/replace_term/g'

我决定了解更多关于find,xargs和sed声明的信息。在 bash 版本 4.4.20(1)-release 的 Ubuntu 18.04 上,我可以将语句简化为:

find . -type f -print | xargs sed -i 's/regex_search_term/replace_term/g'

然后可以再次简化为:

find . -type f | xargs sed -i 's/regex_search_term/replace_term/g'

所以我的问题是,不分别使用-print0带有 和 标志的标志 有-0什么缺点吗?完全放弃标志有什么缺点吗?它们是否明确用于与不同的类 Unix 系统兼容?findxargs-print

bash
  • 1 个回答
  • 322 Views
Martin Hope
John
Asked: 2018-04-10 11:18:42 +0800 CST

Shibboleth 返回 url 不适用于子目录?

  • 1

我们第一次尝试安装 Shibboleth,当在顶级域上为网站应用单点登录时,我们一切正常,但不是在子目录下。

这是我们完美运行的 Apache 虚拟主机配置文件:

  <VirtualHost *:443>

    ... some other settings
    <Location />
        AuthType shibboleth
        Require shibboleth
        ShibRequireSession On
        Order allow,deny
        Allow from all
    </Location>

</VirtualHost>

使用此配置,我们可以这样做:

情景 A

  1. 在https://myawesomewebsite.com/secure我的网络浏览器中访问
  2. 我的网络浏览器将我重定向到我的单点登录服务,网址为https://somesinglesignon.com/authenticate
  3. 我输入我的用户名和密码,https://somesinglesignon.com/authenticate然后按提交
  4. 服务器把我送回https://myawesomewebsite.com/secure

上面的一切都很完美。

现在我要修改我的虚拟主机文件,使其<Location />变为<Location /secure>. 所以我的虚拟主机文件现在看起来像这样:

<VirtualHost *:443>

    ... some other settings
    <Location /secure>
        AuthType shibboleth
        Require shibboleth
        ShibRequireSession On
        Order allow,deny
        Allow from all
    </Location>

</VirtualHost>

现在,当我尝试重复步骤 1 到 4 时,我得到了这个:

情景 B

  1. 在https://myawesomewebsite.com/secure我的网络浏览器中访问
  2. 我的网络浏览器将我重定向到我的单点登录服务,网址为https://somesinglesignon.com/authenticate
  3. 我输入我的用户名和密码,https://somesinglesignon.com/authenticate然后按提交
  4. 服务器把我送回https://myawesomewebsite.com/Shibboleth.sso/SAML2/POST

为什么第 4 步方案 A 与方案 B 中的第 4 步不同?如何使 A.4 与 B.4 相同?

single-sign-on
  • 1 个回答
  • 269 Views
Martin Hope
John
Asked: 2015-08-21 13:20:24 +0800 CST

du -hs * 的文件和目录大小与 du -hs 不一致

  • 4

当我运行 bash 命令du -hs .时,输出是

1.2G .

当我运行 bash 命令du -hs *时,输出是

108K    action
4.0K    activate.php
8.0K    browse.php
584K    captcha
164K    class
4.0K    clearcache
388K    cms
4.0K    comment.complete.php
4.0K    contact.php
530M    docs
116K    documentation
24K     DONE.txt
21M     em
4.0K    footer.php
4.0K    forgot.php
4.0K    header.php
196K    images
264K    includes
8.0K    index.php
168K    js
4.0K    login.php
4.0K    logout.php
4.0K    mail.confirmation.php
4.0K    mail.php
4.0K    news.item.php
4.0K    news.php
4.0K    profile.edit.php
4.0K    profile.php
4.0K    reset.confirmation.php
4.0K    robots.txt
4.0K    signup.confirmation.php
4.0K    signup.php
4.0K    svnstatus
4.0K    svnunknown
4.0K    TODO.txt
16M     tpl

如果将du -hs *输出的所有文件和目录大小相加,则命令大约少 600MB du -hs .。如何找出导致 600MB 的原因?为什么两个命令之间会有如此大的差异?

bash
  • 1 个回答
  • 4067 Views
Martin Hope
John
Asked: 2014-10-17 05:11:56 +0800 CST

网站一直要求下载 ruby​​ 文件?

  • 0

我是红宝石开发的新手。我尝试在 Ubuntu 14.04 上安装 phusion 乘客并将其与 apache 集成。

我完成了此页面的第 2.3 步: https ://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html

但是,当我访问类似 url 时http://192.168.0.105/suburl/home.rb,浏览器会下载 rb 文件,而不是将其作为网页提供。

我迷失在所有的指示中。谁能建议我接下来应该做什么来让我的 home.rb 简单地运行它 puts "hello world"?

这是我的 /etc/apache/sites-enabled/000-default

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

我看到passenger.load 也在mods-enabled 目录中。

apache-2.2
  • 1 个回答
  • 66 Views
Martin Hope
John
Asked: 2013-11-07 20:11:36 +0800 CST

仅带有 RC4-AES 的 SSLCipherSuite

  • 1

我提交了我的 LAMP 服务器(redhat os)进行两次 PCI 合规性扫描。第一次扫描导致 3 个 SSL 错误。他们是:

  1. SSL 服务器支持 SSLv3、TLSv1 的弱加密
  2. SSL 服务器支持 SSLv3、TLSv1 的弱 MAC 算法
  3. SSL 服务器支持 SSLv3、TLSv1 的 CBC 密码

PCI 扫描报告提出了一些解决方案,我在创建 SSLCipherSuite 以解决该问题时采用了这些解决方案。这是生成的 SSLCipherSuite

SSLCipherSuite ALL:!aNULL:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM:!MD5:!IDEA-CBC-SHA:!IDEA-CBC-MD5:!RC2-CBC-MD5:!DES-CBC-SHA:!DES-CBC-MD5:!EXP-DES-CBC-SHA:!EXP-RC2-CBC-MD5:!EXP-RC2-CBC-MD5:!ADH-DES-CBC-SHA:!EDH-RSA-DES-CBC-SHA:!EDH-DSS-DES-CBC-SHA:!EXP-EDH-RSA-DES-CBC-SHA:!EXP-EDH-DSS-DES-CBC-SHA:!EXP-ADH-DES-CBC-SHA

然而,这个 SSLCipherSuite 仍然未能通过问题 3。PCI Scan 的操作员事后给我发电子邮件说我必须删除任何基于 CBC 的内容(例如 DES)。运营商表示,他经常看到将 RC4-AES 作为可用密码作为可接受的解决方案。

所以我接受了他的建议并尝试了

SSLCipherSuite !ALL:RC4-AES

但这会导致 apache 出现错误,并且它不会再次启动。按照运营商的建议,正确的指令是什么?

ssl
  • 1 个回答
  • 457 Views
Martin Hope
John
Asked: 2013-11-02 15:55:14 +0800 CST

SSLCipherSuite - 禁用弱加密、cbc 密码和基于 md5 的算法

  • 8

一位开发人员最近使用 TripWire 对我们的 LAMP 服务器运行了 PCI 扫描。他们确定了几个问题,并指示以下人员纠正这些问题:

问题:SSL 服务器支持 SSLv3、TLSv1、

解决方法:在 httpd.conf 中添加如下规则

SSLCipherSuite ALL:!aNULL:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM

问题:SSL 服务器支持 SSLv3、TLSv1 的 CBC 密码

解决方案:禁用任何使用 CBC 密码的密码套件

问题:SSL 服务器支持 SSLv3、TLSv1 的弱 MAC 算法

解决方案:禁用任何使用基于 MD5 的 MAC 算法的密码套件

我尝试在谷歌上搜索有关如何构建 SSLCipherSuite 指令以满足我的要求的综合教程,但我没有找到任何我能理解的东西。我看到了 SSLCipherSuite 指令的示例,但我需要解释指令的每个组件的作用。所以即使在指令SSLCipherSuite ALL:!aNULL:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM中,我也不明白例如是什么!LOW意思。

有人可以 a) 告诉我 SSLCipherSuite 指令可以满足我的需求,还是 b) 向我展示一个资源,清楚地解释 SSLCipherSuite 的每个部分以及如何构建一个?

ssl
  • 2 个回答
  • 35494 Views
Martin Hope
John
Asked: 2013-11-02 08:34:03 +0800 CST

使用基于 md5 的 mac 算法禁用任何密码套件

  • 4

另一位开发人员最近在我们的服务器上使用 TripWire 进行了 PCI 合规性检查,我们失败的测试之一是“SSL 服务器支持 TLSv1 的弱 MAC 算法”。TripWire 推荐的解决方案是“禁用任何使用基于 md5 的 mac 算法的密码套件”。我试图在谷歌中查找有关如何为我们的 RedHat 风味盒执行此操作的分步说明,但找不到任何内容。

谁能告诉我如何“使用基于 md5 的 mac 算法禁用任何密码套件”?

ssl
  • 1 个回答
  • 834 Views
Martin Hope
John
Asked: 2013-10-24 15:09:26 +0800 CST

如何a2ensite和a2dissite?

  • 15

我已登录 Linux 服务器。我认为这是一个红帽发行版。

命令a2ensite和a2dissite不可用。在/etc/httpd目录中,我没有看到任何提及sites-enabledor sites-available。

我很确定该站点当前正在执行/etc/httpd/conf.d/ssl.conf. 我想做一个a2dissite ssl,然后重新加载Web Server。如何做到这一点?

redhat
  • 2 个回答
  • 55676 Views
Martin Hope
John
Asked: 2013-10-22 13:58:14 +0800 CST

本地主机以外的另一个域?

  • 2

我的电脑上安装了 LAMP,没有问题。我可以去http://localhost,它会默认显示/var/www.

有没有办法添加引用本地主机的新“域”?例如,我可以做一个http://johndesktop并指向/home/john/Desktop文件夹吗?

我只想使用“localhost”这个词以外的东西。

apache-2.2
  • 1 个回答
  • 679 Views
Martin Hope
John
Asked: 2013-05-30 09:53:13 +0800 CST

似乎无法在我的服务器上安装 dahdi

  • 0

我正在尝试在我的服务器上安装 dahdi 模块,但是当我运行 make all 命令时它总是失败。见下文:

root@server:~/dahdi-linux-complete-2.6.2+2.6.2# make all
make -C linux all
make[1]: Entering directory `/root/dahdi-linux-complete-2.6.2+2.6.2/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory `/root/dahdi-linux-complete-2.6.2+2.6.2/linux/drivers/dahdi/firmware'
make[2]: Leaving directory `/root/dahdi-linux-complete-2.6.2+2.6.2/linux/drivers/dahdi/firmware'
You do not appear to have the sources for the 3.9.3-x86-linode52 kernel installed.
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/root/dahdi-linux-complete-2.6.2+2.6.2/linux'
make: *** [all] Error 2

然后我输入以下内容以确认我确实安装了 3.9.3-x86-linode52 内核:

root@server:~/dahdi-linux-complete-2.6.2+2.6.2# uname -a
Linux server 3.9.3-x86-linode52 #1 SMP Mon May 20 09:32:28 EDT 2013 i686 i686 i686 GNU/Linux

为什么 dahdi 抱怨 3.9.3-x86-linode52 的源丢失,即使 uname 说它在那里?

linux
  • 1 个回答
  • 715 Views
Martin Hope
John
Asked: 2013-05-19 04:00:22 +0800 CST

增加 asterisk 守护进程的文件 ulimit

  • 11

如何在我的 ubuntu 计算机上增加星号守护程序的文件限制?当我以 root 身份登录并使用 ulimit 时,它已经表示无限制。我不能以星号登录,因为该用户没有 shell 访问权限,它只是一个守护进程。

我可以在/proc/<asterisk proc id>/limits当前最大打开文件中看到是 1024。我想将其加倍。

我什至进入 /etc/security/limit.conf 并添加

asterisk soft nofile 2048
asterisk hard nofile 2048
@asterisk soft nofile 2048
@asterisk hard nofile 2048

然后我重新启动服务器。尽管如此,最大打开文件数仍为 1024。

我还可以做些什么?

linux
  • 6 个回答
  • 18306 Views
Martin Hope
John
Asked: 2013-04-23 06:07:42 +0800 CST

何时限制 Asterisk 服务器上的并发调用?

  • 1

我有兴趣构建一个通过 Asterisk 服务器调用另一个 android 应用程序的 android 应用程序。这将是严格的 SIP 到 SIP,无需连接到 PSTN。

我读过你可以根据这里 OP 的设置进行数以千计的并发呼叫: Performance of Asterisk Telephony System on Linux

所以我的下一个问题是,我简短地听说一些系统管理员喜欢对并发调用的数量施加限制。这里的优势主要是控制计算机上使用的带宽和资源吗?还是有其他的考虑?

asterisk
  • 1 个回答
  • 1285 Views
Martin Hope
John
Asked: 2012-09-30 05:47:47 +0800 CST

SSL 是否仍会为不同的域加密?

  • 0

我有一个客户,他的 www.website.com 网址上有 ssl,但现在是 website.com 网址。因此,当他们访问https://website.com/admin-login.php时,他们会看到一个 SSL 错误,表明它不属于该域。我的客户可以跳过此屏幕并继续访问该网站。

我的问题是,即使他们跳过此屏幕,SSL 是否会像网站的 www 版本一样继续加密/保护所有相关内容?

ssl-certificate
  • 2 个回答
  • 78 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve