问题描述
使用redirect_to跳转时子域名丢失,比如跳转到subdomain.example.com/admins/users时nginx会帮你解析到subdomain.example.com/admins/.example.com/admins/users
解决方法
在nginx配置文件里面添加如下代码
proxy_redirect off;
问题描述
使用redirect_to跳转时子域名丢失,比如跳转到subdomain.example.com/admins/users时nginx会帮你解析到subdomain.example.com/admins/.example.com/admins/users
解决方法
在nginx配置文件里面添加如下代码
proxy_redirect off;
block assign
User.where(email: '[email protected]').first_or_initialize.tap do |admin_u|
admin_u.is_admin = true
admin_u.first_name = 'Admin'
admin_u.last_name = 'User'
admin_u.user_type = 'admin'
admin_u.save!
end
创建用户
CREATE USER 'usuario'@'localhost' IDENTIFIED BY 'contraseña';
创建数据库
CREATE DATABASE mydatabase CHARACTER SET utf8
授权
网站发布前可以先搭建一个http://launcheffectapp.com/ 用来收集用户信息
###Grant a User Root Privileges The sudo command is configured through a file located at /etc/sudoers. Note: Never edit this file with a normal text editor! Always use the visudo command instead!
root ALL=(ALL:ALL) ALL
demo ALL=(ALL:ALL) ALL
###Tutorial Install LMNP
magento安装权限问题
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media
chmod -R 777 var/
##一些不错的sublime text插件
###命令行快速启动sublime###