• Hosting,  Linux

    Rewrite rule – Force HTTPS / Linux

    Forcing HTTPS is very easy to do in Apache. The common command is to force everything to HTTPS. In your host file, under :80 make sure you have the following. At the same time, make sure you have :443 open and that your configuration is ready to host the new traffic. #Force HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] To check if your apache config is working properly, you can run: apachectl configtest

  • Hosting,  Linux

    Postfix outgoing address change

    ISSUE:  When you install Postfix, the default outgoing address on that server will be apache@machinename.local. RESOLUTION:  To change the outgoing address or the FROM address from your mailings, make the following changes: edit the /etc/postfix/main.cf file change the mydomain field to your mail domain [mydomain = mydomain.com] Add the following text to the bottom of the file: smtp_generic_maps = hash:/etc/postfix/generic Save the main.cf file and exit edit the /etc/postfix/generic file at the bottom of the file you need to map the email addresses to the ones you want. apache@machinename.local     myemail@mydomain.com root@machinename.local           myemail@mydomain.com @machinename.local                 myemail@mydomain.com (this…

  • Linux

    CentOS cheatsheet

    Add user to group:  useradd -G <groupname> <username> Change password:  passwd <username> Allow sudo access: visudo Server Hostname:  /etc/hosts, /etc/sysconfig/network PostgreSQL: yum install postgresql-server postgresql-cli service postgresql initdb chkconfig postgresql on /var/lib/pgsql/data/pg_hba.conf (add “host all all trust” near bottom of page) service postgresql start yum commands:   remove install list <package>* list installed | grep “^<package>” List bash history:  cat /root/.bash_history