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

GHOST's questions

Martin Hope
GHOST
Asked: 2019-02-15 22:48:56 +0800 CST

戴尔膝上控制显示器(盖子)关闭选项

  • 1

我在 Ubuntu 18.04 上使用 Dell lap,当盖子(显示屏)关闭时自动进入睡眠状态,但我不需要发生任何事情

在windows中我们可以控制

如何更改关闭笔记本电脑盖的功能

像Ubuntu一样怎么处理?

power-management suspend laptop dell lid
  • 1 个回答
  • 63 Views
Martin Hope
GHOST
Asked: 2018-12-18 23:05:18 +0800 CST

Apache 重写 URL 在 vhost.conf 中不起作用

  • 0

这是我的 vhost.conf

<VirtualHost *:80>
<files xmlrpc.php>
      order allow,deny
      deny from all
    </files>
    ServerName www.myserver.com
    ServerAlias myserver.com

    DocumentRoot /var/www/vhosts/www.myserver.com
    <Directory /var/www/vhosts/www.myserver.com>
   Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
# AllowOverride None
        #Order Allow,Deny
        #Allow from All
        #Deny from 124.43.19.230

        <IfModule mod_rewrite.c>
          RewriteEngine On
          RewriteBase /
          RewriteRule ^index\.php$ - [L]
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule . /index.php [L]

# Restrict access to PHP files from plugin and theme directories
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/
RewriteRule wp-content/plugins/(.*\.php)$ - [R=404,L]
RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/
RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L]
        </IfModule>
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/
RewriteRule wp-content/plugins/(.*\.php)$ - [R=404,L]
RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php
RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/
RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L]
</Directory>
</VirtualHost>

在浏览器中输入 www.myserver.com 时,它会转到我的根目录并获取 index.php

但是当我输入 myserver.com 时,它会转到默认的 Apache 网页(index.html)加载

所以我添加这一行进行重写

</VirtualHost>
 <VirtualHost *:80>
      ServerName myswever.com
      ServerAlias *.myswever.com
      Redirect permanent / https://www.myswever.com/
    </VirtualHost>

但它不起作用它是一个word-press网站如何重新连接url

当某些类型 myswever.com 它应该加载 www.myswever.com

server php apache2 mod-rewrite
  • 1 个回答
  • 1204 Views
Martin Hope
GHOST
Asked: 2018-11-09 06:38:32 +0800 CST

如何使 apache 重定向到 www 子域?

  • 0

我有以下内容sites-available

<VirtualHost *:80>
    DocumentRoot /var/www/html/mywrk
    DirectoryIndex index.php
    ServerName www.mydomain.com
   <Directory "/var/www/html/mywrk">
         Options Indexes FollowSymLinks MultiViews
         AllowOverride All
         Order allow,deny
         allow from all
         Require all granted
  </Directory>
  </VirtualHost>

在这里它可以工作,但 mydomain.com(没有 www)不会重定向到 www.mydomain.com

在apache2主机中,如何设置非www重定向到www?我的意思是 mydomain.com 应该重定向到 www.mydomain.com

server permissions php dns apache2
  • 1 个回答
  • 1254 Views
Martin Hope
GHOST
Asked: 2018-09-20 23:44:30 +0800 CST

如何为apache配置letsencrypt

  • 1

如何为域配置 OpenSSL Lets-encrypt?如果在此处发布完整答案,我会遇到一些问题,这对我真的很有帮助。

我试过这个官方文档,但它对我没有帮助。

注意:操作系统 Ubuntu 18.04

我需要知道如何添加虚拟主机apache2

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-apache

我关注了这个,但这里没有显示域名。

openssl
  • 1 个回答
  • 218 Views
Martin Hope
GHOST
Asked: 2018-09-17 00:53:55 +0800 CST

sudo apt install python-certbot-nginx 错误 ubuntu 18.04

  • 0

嗨,我尝试设置让加密我按照本教程进行(这是由数字 ocesn 完成的)

我试试这个命令

sudo apt install python-certbot-nginx

我把这个拿出来

sudo: unable to resolve host ip-172-31-23-194: Resource temporarily unavailable
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:
 python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我也得到了这个错误

  python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
WARNING:root:could not open file '/etc/apt/sources.list'

我检查这个位置 '/etc/apt/sources.list'它有空

注意:我更新 16.04-->1804 更新使用 do release 命令

server lubuntu
  • 1 个回答
  • 1071 Views
Martin Hope
GHOST
Asked: 2018-09-16 14:42:16 +0800 CST

E: 软件包需要重新安装,但我找不到它的存档 [libpolkit-gobject-1-0]

  • 0

不管 sudoapt-get install我得到这个错误我的服务器运行顺利但突然我得到这个错误

我在这里尝试sudo apt-get install -f

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package libpolkit-gobject-1-0 needs to be reinstalled, but I can't find an archive for it.

这是我得到的错误我不知道这是什么但我想解决这个问题所以任何人都知道它为什么会发生以及如何解决它?

我参考这个问题

E:需要重新安装软件包,但我找不到它的存档[重复]

Apt/Synaptic 需要重新安装软件包,但找不到它的存档

xubuntu
  • 1 个回答
  • 965 Views
Martin Hope
GHOST
Asked: 2018-08-28 02:16:15 +0800 CST

当文件数量达到>N个文件时如何删除文件?

  • 0

我有一个游戏服务器。它会自动获取玩家的截图并存储在 /home/gameserver/serverfiles/screenshots.

我想在达到 1000 个时删除旧的屏幕截图。我的意思是如果是 1000 个屏幕截图,当新的屏幕截图出现时,它会自动删除第 1000 个屏幕截图。

我该怎么做,我可以使用哪些脚本?任何人都可以提供建议或代码吗?

注意:我使用的是 Ubuntu 18.04,而我的游戏服务器用户没有 sudo 访问权限。

我想维护我的屏幕截图文件夹以容纳最多 1000 张图像。

scripts command-line
  • 1 个回答
  • 271 Views
Martin Hope
GHOST
Asked: 2018-08-08 04:10:21 +0800 CST

撤销文件所有权并授予用户

  • -1

在我的 Ubuntu 服务器中,我有一个用户叫 cod,我不小心给了一些 sh ​​文件内部的所有权,然后我以 root 身份登录并尝试删除所有者权限,但不能。

sudo  chown -R cod4up:cod4up /home/cod4up/

当我输入这个时,我得到了这个错误

changing ownership of
'/home/cod4up/serverfiles/OGP_HOME_000000004_startup_scr.sh':
Operation not permitted

无论我输入什么,我都无能为力。如何授予用户 cod4up 许可?

注意:当我输入密码时,我尝试以 cod4up 身份登录,但出现此错误

但我想删除这个文件夹中的 /home/cod4up/serverfile 我想删除

OGP_HOME_000000004_startup_scr.sh

这个文件,因为它有权限。请帮我解决这个问题。

server permissions
  • 1 个回答
  • 93 Views
Martin Hope
GHOST
Asked: 2018-07-25 22:04:56 +0800 CST

如何在 Ubuntu 16.04 / 17.10 上配置 Postfix 以使用 Gmail SMTP

  • 1

我使用命令安装了 Postfix 邮件传输代理sudo apt install mailutils。

我在终端中使用以下命令。

echo "This is the body of the email" | mail -s "This is the subject line" [email protected]

它运行良好,但我想使用我的 gmail 帐户。我怎样才能做到这一点?

请注意,我的 Ubuntu 版本是 18.10。

postfix
  • 1 个回答
  • 3411 Views
Martin Hope
GHOST
Asked: 2018-07-25 00:31:02 +0800 CST

当我尝试在 Ubuntu 18.04 上安装 squirrelmail 时“找不到包”

  • 3

我尝试了这个命令sudo apt-get install squirrelmail并得到了这个输出

Reading package lists... Done
Building dependency tree 
Reading state information... Done
E: Unable to locate package squirrelmail

为什么会这样?如何安装 squirrelmail?

我正在使用 Ubuntu 18.04。

我看到了一个没有答案的类似问题:如何在 Ubuntu 中安装 Squirrelmail?

software-installation apt
  • 2 个回答
  • 20362 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve