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

seanl's questions

Martin Hope
seanl
Asked: 2010-04-12 07:27:07 +0800 CST

后缀(仅用于发送邮件)多域设置

  • 1

我有以下问题,我有一个托管几个 nginx 站点(一些静态,一些 cakephp)的 Centos 5.4 VPS,我希望能够通过后缀从每个站点联系页面发送电子邮件到我的谷歌应用托管电子邮件(不同的帐户对于每个站点),以便应用程序可以向填写联系表格的人发​​送自动电子邮件等

我有一个简单的后缀安装,并将以下内容添加到 main.cf 配置文件中。从使用本指南

virtual_alias_domains = hash:/etc/postfix/virtual_alias_domains
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps

(这两个文件都已使用 postmap 转换为 db 文件)

我已经为每个站点正确配置了 DNS 并设置了 SPF 记录。(我知道 R-DNS 仍然会引用我的实际主机名而不是域名并导致可能的垃圾邮件问题,但一次只有一件事)

我可以远程登录 localhost 和 helo localhost,以便我可以从 virtual_alias_domains 中的地址向 virtual_alias_maps 文件中的电子邮件发送命令行电子邮件,该电子邮件似乎发送时没有给出错误,但它发送到我的本地 linux 帐户而不是电子邮件地址指定的。

我的问题是我在虚拟别名映射方面是否采用了错误的方式,或者这甚至可以按照我尝试的方式进行。非常感谢任何帮助,谢谢。

我的 postconf -n Outlook 看起来像这样

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = myactual hostname
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual_alias_domains
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
centos postfix domain
  • 2 个回答
  • 5671 Views
Martin Hope
seanl
Asked: 2009-06-27 01:15:44 +0800 CST

cakephp & nginx 配置/重写规则

  • 3

嗨,有人请帮帮我,我也在 stackoverflow 上问过这个问题,但没有得到太多回应,并且正在争论它是编程还是服务器相关。

我正在尝试在使用 Fact CGI 运行 Nginx 的 Centos 服务器上设置 cakephp 环境。我已经在服务器上运行了一个 wordpress 站点和一个 phpmyadmin 站点,所以我正确配置了 PHP。

我的问题是我无法在我的虚拟主机中正确设置重写规则,以便蛋糕正确呈现页面,即样式等。我已经尽可能多地在谷歌上搜索,下面列出的网站的主要共识是我需要制定以下重写规则

location / {
  root /var/www/sites/somedomain.com/current;
  index index.php index.html;

  # If the file exists as a static file serve it 
  # directly without running all
  # the other rewrite tests on it
  if (-f $request_filename) { 
    break; 
  }
  if (!-f $request_filename) {
    rewrite ^/(.+)$ /index.php?url=$1 last;
    break;
  }
}

http://blog.getintheloop.eu/2008/4/17/nginx-engine-x-rewrite-rules-for-cakephp

问题是这些重写假设你直接从 webroot 中运行 cake,这不是我想要做的。我对每个站点都有一个标准设置,即每个站点一个文件夹,其中包含以下文件夹日志、备份、私人和公共。公共场所 nginx 正在寻找其要服务的文件,但我私下安装了蛋糕,并在公共链接回 /private/cake/ 的符号链接

这是我的虚拟主机

server {
    listen 80;
    server_name app.domain.com;

    access_log /home/public_html/app.domain.com/log/access.log;
    error_log /home/public_html/app.domain.com/log/error.log;

    #configure Cake app to run in a sub-directory
    #Cake install is not in root, but elsewhere and configured
    #in APP/webroot/index.php**

    location /home/public_html/app.domain.com/private/cake {
        index index.php;

        if (!-e $request_filename) {
            rewrite ^/(.+)$ /home/public_html/app.domain.com/private/cake/$1 last;
            break;
        }

    }

    location /home/public_html/app.domain.com/private/cake/ {
        index index.php;

        if (!-e $request_filename) {
            rewrite ^/(.+)$ /home/public_html/app.domain.com/public/index.php?url=$1 last;
            break;
        }

    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME /home/public_html/app.domain.com/private/cake$fastcgi_script_name;
        include        /etc/nginx/fastcgi_params;
    }

}

现在就像我说的那样,我可以看到 cake 的主要 index.php 并将其连接到我的数据库,但是这个页面没有样式,所以在我继续之前,我想正确配置它。我究竟做错了什么………。

谢谢海尔

centos php nginx cakephp
  • 3 个回答
  • 9777 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