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-555255

Jonas Heinze's questions

Martin Hope
Jonas Heinze
Asked: 2020-07-06 08:15:17 +0800 CST

更改 linux 外壳

  • 0

在我的 Centos7 服务器上,我为我的用户提供了不同的 shell。

例如,作为 root 的终端如下所示:

[root@hostname www]#.

终端作为不同用户的样子bash-4.2$。

如果我键入echo $0以获取当前使用的 shell,我将/bin/bash访问我的不同用户和-bash我的 root。

我是否必须为我的不同用户配置 shell,以使其看起来像我的 root 的 shell?

有没有办法使用 Debian ( bash) 中使用的 shell 来查看我所在位置的完整路径?(root@server:/var/www#而不是root@server www)。

谢谢你的帮助。

linux terminal-server shell terminal centos7
  • 2 个回答
  • 105 Views
Martin Hope
Jonas Heinze
Asked: 2020-01-12 14:46:51 +0800 CST

使用 httpd 禁用 TLSv1.0 和 TLSv1.1

  • 0

我要从Debian到CentOS 7。我在我的文件中使用了相同的Apache/httpd参数。.config

不知何故TLSv1.0,TLS1.1似乎在httpd.

我使用https://www.ssllabs.com/ssltest/analyze.html?d=jonas-heinze.de&hideResults=on和https://www.cdn77.com/tls-test测试了我的活动TLS版本

根据Debian我曾经SSLProtocol -ALL +TLSv1.2禁用它。

如果我添加-TLSv1并且-TLSv1.1它仍然处于启用状态。

我需要不同的配置httpd吗?

centos
  • 3 个回答
  • 3355 Views
Martin Hope
Jonas Heinze
Asked: 2020-01-11 10:20:15 +0800 CST

CentOS httpd 403 被禁止

  • 0

我最近设置了我的第一台 CentOS7(64 位)服务器。以前我使用 Debian。我用 2 个简单的 vHosts 设置了 httpd,但我在浏览器中看到的只是 Error 403。我制作了 2 个文件夹,/var/www其中的域被命名为。在这些文件夹中,我放置了一个简单的 .htm 文件,它只输出几个单词。之后,我授予了我和所有其他子文件夹和文件777的权限(仅用于测试) 。www

后来我在sites-available.sites-enabled/etc/httpd

然后我制作了 vHost 文件jonas-heinze.de.conf and projectaes.net.conf(与 中的文件夹同名www)并放入

<VirtualHost *:80>
     ServerName jonas-heinze.de
     DocumentRoot /var/www/jonas-heinze.de
</VirtualHost>

和

<VirtualHost *:80>
     ServerName projectaes.net
     DocumentRoot /var/www/projectaes.net
</VirtualHost>

里面。

sudo ln -s /etc/httpd/sites-available/jonas-heinze.de.conf /etc/httpd/sites-enabled/jonas-heinze.de.conf 激活我使用的vHosts sudo ln -s /etc/httpd/sites-available/projectaes.net.conf /etc/httpd/sites-enabled/projectaes.net.conf,虽然放在IncludeOptional sites-enabled/*.conf我的httpd.conf.

在网上我看到了一些关于 CentOS 中使用的特殊权限系统的信息,所以我运行了这个sudo setsebool -P httpd_unified 1命令。

但是,如果我连接到 jonas-heinze.de,我得到的只是 403 错误屏幕。

getenforce返回了一个disabled。

另外我禁用Selinux并/etc/selinux/config检查了httpd.conf.

我跑httpd -S了,它回来了

VirtualHost configuration:
*:80                   jonas-heinze.de (/etc/httpd/sites-enabled/jonas-heinze.de                                                                                                                     .conf:1)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

看起来主 DocumentRoot 是错误的。所以我index.html在那个中创建了一个。

centos
  • 1 个回答
  • 455 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