我正在运行Ubuntu 18.04.5,Nginx,Webinoly CP。看来Postal的安装还可以,但是因为我是一个初学者,所以我没有正确配置Postal config文件,因此我可以使用所需的任何路径来访问它。主要域名需要用于我的网站,我想将Postal放在domain.com/postal之类的东西上,而不是放在domain.com甚至postal.domain.com上。
我认为有两个文件相关。见下文:
nano /opt/postal/config/postal.yml
<foreach item="item" separator="," collection="raffleDataList">
<![CDATA[
(
#{item.raffleNo}, #{item.storeNo}, #{item.storeId}, #{item.favoriteArea}, #{item.modelId},
#{item.size}, #{item.personName}, #{item.personId}, #{item.createDate_join1}, #{item.createDate_join2},
#{item.createDate_web_join}, #{item.email}, #{item.birthDate}, #{item.isOut}, #{item.address},
#{item.creator}, NOW(), false,
#{item.randomNo}, #{item.rank2}, #{item.fileNo}
)
]]>
sudo nano /etc/nginx/conf.d/postal.ichangemydomain.com.conf
web:
# The host that the management interface will be available on
host: postal.ichangemydomain.com
# The protocol that requests to the management interface should happen on
protocol: https
fast_server:
# This can be enabled to enable click & open tracking on emails. It is disabl$
# default as it requires a separate static IP address on your server.
enabled: false
bind_address:
general:
# This can be changed to allow messages to be sent from multiple IP addresses
use_ip_pools: false
main_db:
# Specify the connection details for your MySQL database
host: 127.0.0.1
username: postal
password: password
database: postal
message_db:
# Specify the connection details for your MySQL server that will be house the
# message databases for mail servers.
host: 127.0.0.1
username: postal
password: password
prefix: postal
rabbitmq:
# Specify the connection details for your RabbitMQ server.
host: 127.0.0.1
username: postal
password: password
vhost: /postal
dns:
# Specifies the DNS record that you have configured. Refer to the documentati$
# https://github.com/atech/postal/wiki/Domains-&-DNS-Configuration for further
# information about these.
mx_records:
- mx.postal.ichangemydomain.com
smtp_server_hostname: postal.ichangemydomain.com
spf_include: spf.postal.ichangemydomain.com
return_path: rp.postal.ichangemydomain.com
route_domain: routes.postal.ichangemydomain.com
track_domain: track.postal.ichangemydomain.com
smtp:
# Specify an SMTP server that can be used to send messages from the Postal ma$
# system to users. You can configure this to use a Postal mail server once the
# your installation has been set up.
host: 127.0.0.1
port: 2525
username: # Complete when Postal is running and you can
password: # generate the credentials within the interface.
from_name: Postal
from_address: postal@yourdomain.com
rails:
# This is generated automatically by the config initialization. It should be $
# string unique to your installation.
secret_key: 3265da9dfgjsjsaa422fb32flkjn45lk2j3c4b3fciwe78qdfy8qwe9rf