服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

我如何设置PHP在Apache上发送电子邮件? (视窗)

我在Windows上设置了一个Apache服务器(2.2.14),并借鉴了现有的XAMPPconfiguration。 我正在尝试为PHP(5.3.1)设置电子邮件function。 (它需要能够处理附件,就像XAMPP服务器一样。) 我注意到,XAMPP带有虚假的Windows sendmail ,但有关configuration的一些事情对我来说没有意义。 以下是XAMPP的php.ini中的几行代码: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t" 这很奇怪,因为: 它明确表示“仅用于Unix” 我不断看到教程说,使用这一行的Windows,和 示例文件path在Unix中甚至没有意义 sendmail_path默认被注释掉 我想知道是否sendmail.exe是必要的。 所以在我的自定义Apache服务器上,它没有sendmail.exe ,我编辑了php.ini来为SMTP , smtp_port和sendmail_from添加正确的信息。 这样,就能发送邮件了! 但是速度很慢。 然后我回到了XAMPP服务器,并重新命名了sendmail目录,希望禁用sendmail。 这种工作 – 我的PHP脚本声称已经发送,但没有发生。 所以我很困惑。 我的XAMPP服务器有sendmail_path注释掉,但显然仍然使用它指向的程序。 它是如何知道的? 我的Apache服务器在sendmail_path中没有任何东西,但可以以某种方式发送没有它的邮件。 它是如何做到的? 我真的需要做些什么来configurationApache服务器来发送电子邮件?

在Apache上无法安装SSL证书

我们有专门的服务器与运行Plesk需要SSL的GoDaddy。 我已经生成了证书文件,并且创build了一个vhost_ssl.conf(因为我不能编辑默认的plesk apacheconfigurationhttp.include,vhost_ssl.conf被包含到httpd.include中),它告诉apache在哪里可以find证书文件: SSLCertificateFile /usr/local/psa/var/certificates/domain.com.crt SSLCertificateKeyFile /usr/local/psa/var/certificates/domain.com.key SSLCertificateChainFile /usr/local/psa/var/certificates/sub.class1.server.ca.pem 当我停止/启动apache时,它拒绝启动。 error_log没有任何东西(这很奇怪)。 然后我打开httpd.include,发现这个位: <VirtualHost 208.xxx.xxx.xxx:443> ServerName domain.com:443 ServerAlias www.domain.com UseCanonicalName Off SSLEngine on SSLVerifyClient none SSLCertificateFile /usr/local/psa/var/certificates/certagC9054 Include /var/www/vhosts/domain.com/conf/vhost_ssl.conf 然后我注意到了 SSLCertificateFile /usr/local/psa/var/certificates/certagC9054 (这是plesk的SSL证书),并重新启动apache,它工作得很好。 似乎Apache不喜欢同一个VirtualHost指令中的多个SSLCertificateFile? 任何使用plesk的人都知道,我不能只删除httpd.include中的SSLCertificateFile指令,因为当有人使用它时,plesk会覆盖我的更改 – 这就是为什么它在vhost_ssl.conf中的原因。 所以我被卡住了,这超出了我微薄的pipe理技能。 希望有人知道他正在做什么来告诉我发生了什么事情。 提前致谢。