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

Tall boY's questions

Martin Hope
Tall boY
Asked: 2015-12-15 03:34:55 +0800 CST

phpMyAdmin - 403 权限被拒绝 - Centos7

  • 0

我在 Centos7 上运行 apache 2.4.6 的服务器上安装了 phpMyAdmin,我收到错误,因为您无权访问此服务器上的 /phpmyadmin。

我的服务器 ip 是62.210.xx.xx 我62.210.xx.xx/phpmyadmin/从另一个 ip 远程浏览xx.xx.xx.xx

/etc/httpd/conf.d/phpMyAdmin.conf

# phpMyAdmin - Web based MySQL browser written in php
# 
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory "/usr/share/phpMyAdmin/">
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
       Require ip 62.210.xx.xx
     </RequireAny>
   </IfModule>

   <IfModule !mod_authz_core.c>
     # Apache 2.2
     #Order Deny,Allow
     #Allow from 127.0.0.1
     #Allow from ::1
     #Allow from 62.210.xx.xx
     #Deny from All
     Allow from All
   </IfModule>
</Directory>

<Directory "/usr/share/phpMyAdmin/setup/">
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
       Require ip 62.210.xx.xx
     </RequireAny>
   </IfModule>

   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Allow from 127.0.0.1
     Allow from ::1
     Allow from 62.210.xx.xx
     #Deny from All
     #Allow from All
   </IfModule>
</Directory>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory "/usr/share/phpMyAdmin/libraries/">
    #Order Deny,Allow
    #Deny from All
    #Allow from None
</Directory>

<Directory "/usr/share/phpMyAdmin/setup/lib/">
    #Order Deny,Allow
    #Deny from All
    #Allow from None
</Directory>

<Directory "/usr/share/phpMyAdmin/setup/frames/">
    #Order Deny,Allow
    #Deny from All
    #Allow from None
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<IfModule mod_security.c>
#    <Directory "/usr/share/phpMyAdmin/">
#        #SecRuleInheritance Off
#    </Directory>
#</IfModule>

我已经添加了行Require ip 62.210.xx.xx ,并Allow from 62.210.xx.xx按照此处其他问题的建议,但仍然无法正常工作。

请查看并建议任何可能的方法。

谢谢

更新它的工作,Require all granted但这Require mylocalIP不是我想要的,我只想从我的服务器 ip62.210.xx.xx或本地 ip 范围允许

apache-2.4
  • 3 个回答
  • 4749 Views
Martin Hope
Tall boY
Asked: 2015-12-09 04:38:05 +0800 CST

Webmin - 删除文件管理器书签

  • 0

我使用链接在 Webmin 文件管理器中创建了太多书签bookmark this page,现在当我单击bookmarks书签菜单窗口时,会出现并隐藏在浏览器中。我现在无法访问书签,请建议我重置书签或删除某些书签的方法。

谢谢

webmin
  • 1 个回答
  • 561 Views
Martin Hope
Tall boY
Asked: 2015-12-08 01:28:11 +0800 CST

FTP - 从一台服务器到备份服务器 - centos 7

  • 0

我想将我的服务器数据备份到分配给我的备份服务器空间,我只能做 FTP。SFTP 或 SCP 不是选项。

我正在尝试这种方式

ftp -n backup.server.net
Trying 62.210.xx.xx...
Connected to backup.server.net (62.210.xx.xx).
220 server ready - login please
ftp> user xxxx yyyy
331 password required
230 login accepted
ftp> put /var/www/html/index.php
local: /var/www/html/index.php remote: /var/www/html/index.php
227 Entering Passive Mode (62,210,xx,xx,xx,xxx)
553 Can't open that file: No such file or directory
ftp> get /var/www/html/index.php
local: ./var/www/html/index.php remote: /var/www/html/index.php
local: ./var/www/html/index.php: No such file or directory
ftp>

但它不起作用,请查看并建议任何可能的方法。

谢谢

更新

我可以从其他目录上传,/root但不能从其他目录上传,如果我在 ftp 之前先切换到目录,我只能从其他目录上传

ftp> put index-root.php
local: index-root.php remote: index-root.php
227 Entering Passive Mode (62,210,xx,xx,xx,xx)
150 Accepted data connection
226 File successfully transferred
ftp> ls
227 Entering Passive Mode (62,210,xx,xx,xx,xx)
150 Accepted data connection
-rw-r--r--    1 1001       ftp                 0 Dec  7 11:10 index-root.php
226 1 matches total
ftp
  • 2 个回答
  • 776 Views
Martin Hope
Tall boY
Asked: 2015-12-03 06:27:59 +0800 CST

后缀不适用于 user@example.com 类型用户

  • 0

我在 Centos 7.1 上设置了一些虚拟主机,我希望用户喜欢user@example.com这样我可以通过回复user@example.com而不喜欢user@localhost.localdomain

Postfix 正在与用户喜欢user但不与user@example.com,它显示错误status=bounced (User unknown in virtual alias table);

/etc/postfix/main.cf

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd   $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps = hash:/etc/postfix/relay_recipients
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 62.210.xx.xx/24, 192.168.1.0/24, 127.0.0.0/8, [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains =
relay_recipient_maps = hash:/etc/postfix/relay_recipients
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_alias_domains = example1.com example2.com example3.com 
virtual_alias_maps = dbm:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual

/etc/postfix/虚拟

example1.com example1.com
#admin@example1.com admin
admin@example1.com admin@example1.com

当我这样做时,我会收到邮件

example1.com example1.com
admin@example1.com admin

我收到错误status=bounced (User unknown in virtual alias table) doing this

example1.com example1.com
admin@example1.com admin@example1.com

请提出任何可能的方法来做到这一点

谢谢

postfix
  • 3 个回答
  • 521 Views
Martin Hope
Tall boY
Asked: 2015-12-02 00:09:41 +0800 CST

虚拟主机不在不同的端口上工作

  • 11

我正在尝试将我的网站托管在运行 centos7.1 的单台服务器上。我可以在端口上进行虚拟主机,80 但是当我将端口更改second-site为它时,8080它指向first-site. 但是,对于 URLhttp://62.210.xx.xx:8080/其正常工作,指向second-site.

我这样做:

httpd.conf

Listen 80
Listen 8080

also tried 
Listen 0.0.0.0:80
Listen 0.0.0.0:8080
but same

commented out for apache 2.4
#NameVirtualHost 62.210.xx.xx:80
#NameVirtualHost 62.210.xx.xx:8080

ServerAdmin root@localhost

#first-site.com
<VirtualHost 62.210.xx.xx:80>
ServerName first-site.com
ServerAlias www.first-site.com
DocumentRoot /var/www/first-site
</VirtualHost>

#second-site.com
<VirtualHost 62.210.xx.xx:8080>
ServerName second-site.com
ServerAlias www.second-site.com
DocumentRoot /var/www/second-site
</VirtualHost>


netstat -tulpn | grep httpd
tcp6       0      0 :::80                   :::*                    LISTEN      25253/httpd
tcp6       0      0 :::8080                 :::*                    LISTEN      25253/httpd


/etc/host/
62.210.xx.xx www.first-site.com first-site.com www.second-site.com second-site.com

/usr/sbin/httpd -t
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:46
Syntax OK

更新

apachectl -S
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, 
using 62.210.xx.xx. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
62.210.xx.xx:8080      m.second-site.com (/etc/httpd/conf/httpd.conf:427)
62.210.xx.xx:80        is a NameVirtualHost
     default server first-site.com (/etc/httpd/conf/httpd.conf:363)
     port 80 namevhost first-site.com (/etc/httpd/conf/httpd.conf:363)
             alias www.first-site.com
     port 80 namevhost image.first-site.com (/etc/httpd/conf/httpd.conf:3                                                                             77)
     port 80 namevhost m.first-site.com (/etc/httpd/conf/httpd.conf:389)
     port 80 namevhost second-site.com (/etc/httpd/conf/httpd.conf:401)
             alias www.second-site.com
     port 80 namevhost image.second-site.com (/etc/httpd/conf/httpd.conf:415)
     port 80 namevhost third-site.com (/etc/httpd/conf/httpd.conf:439)
             alias www.third-site.com
     port 80 namevhost image.third-site.com (/etc/httpd/conf/httpd.conf:453)
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 fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex fcgid-proctbl: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="xxxxxxx" id=1000
Group: name="root" id=0
virtualhost
  • 5 个回答
  • 35411 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