Steps with explanations to set up a server using:
- virtualenv
- Django
- nginx
- uwsgi
| <?xml version="1.0"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <fontconfig> | |
| <match target="font" > | |
| <edit mode="assign" name="rgba" > | |
| <const>rgb</const> | |
| </edit> | |
| </match> | |
| <match target="font"> | |
| <edit mode="assign" name="lcdfilter"> |
| server { | |
| location /phpmyadmin { | |
| root /usr/share/; | |
| index index.php index.html index.htm; | |
| location ~ ^/phpmyadmin/(.+\.php)$ { | |
| try_files $uri =404; | |
| root /usr/share/; | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac |
| server { | |
| listen 80; | |
| server_name www.example.com; | |
| root /var/www/vhosts/example.com/public/; | |
| location / | |
| { | |
| index index.php index.html index.htm; | |
| } |
| apt-get install php5-dev php-pear make mongodb | |
| pecl install mongo | |
| echo 'extension=mongo.so' > /etc/php5/mods-available/mongodb.ini | |
| cat /etc/php5/mods-available/mongodb.ini | |
| ln -s /etc/php5/mods-available/mongodb.ini /etc/php5/fpm/conf.d/20-mongodb.ini | |
| service php5-fpm restart |
| <?php | |
| /** | |
| * this is a fix mainly for wordpress, to prevent xml error | |
| * | |
| * this solution is from http://www.vichaunter.com/desarrollo-web/solucion-para-error-line-2-column-6-xml-declaration-allowed-start-document-wordpress | |
| * | |
| */ | |
| function ___wejns_wp_whitespace_fix($input) { | |
| /* valid content-type? */ |
| server { | |
| client_body_in_file_only clean; | |
| client_body_buffer_size 32K; | |
| client_max_body_size 300M; | |
| sendfile on; | |
| send_timeout 300s; | |
| # Port that the web server will listen on. | |
| #listen 80; |
| <?php | |
| use LaravelBook\Ardent\Ardent; // it can be Eloquent too | |
| class BaseModel extends Ardent { | |
| protected $_name; | |
| public static function optionList($attribute = 'name') { | |
| $model = static::getModel(); |
| /etc/hosts | |
| /var/lib/mysql/ | |
| /etc/nginx/sites-available | |
| /etc/nginx/nginx.conf # maybe? |