О Высоких Технологиях и Жизненных Ситуациях

For example if You need to create symbolic link for your virtual host config in Nginx — web server just write this:

ln -s /etc/nginx/sites-available/example.conf /etc/nginx/sites-enabled/

Where /etc/nginx/sites-available/example.conf is path to your original file and /etc/nginx/sites-enabled/  — path to directory where do you want to place Symbolic link, without filename!

java.lang.OutOfMemoryError: PermGen space

Go to Run — Edit configurations
Edit VM options field in Tomcat Server

and Add this parameter


-XX:MaxPermSize=256m

permgen_space

Open Command Prompt:
taskkill /f /pid 000
000 — it’s pid number of process ( You can see it when type tasklist );

If You have already configured Nginx server on Ubuntu  with php back-end, but You need to setup Redmine bug-tracker, you need Setup another environment and one of the is «Phusion Passenger» which better to setup in current situation in Stand-Alone mode.

Config for Virtual Hosts in /etc/nginx/sites-available: 
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
server_name www.foo.com;

# Tells Nginx to serve static assets from this directory.
root /webapps/foo/public;

location / {
# Tells Nginx to forward all requests for www.foo.com
# to the Passenger Standalone instance listening on port 4000.
proxy_pass http://127.0.0.1:4000;

# These are "magic" Nginx configuration options that
# should be present in order to make the reverse proxying
# work properly. Also contains some options that make WebSockets
# work properly with Passenger Standalone. Please learn more at
# http://nginx.org/en/docs/http/ngx_http_proxy_module.html
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_buffering off;
}
}

I recommend create own file for example (passenger) and put it in directory
/etc/nginx/sites-available with symbolic-link
to /etc/nginx/sites-enabled by this command:

ln -s /etc/nginx/sites-available/passenger /etc/nginx/sites-enabled/passenger


How to lunch Phusion Passenger web server?

First of all You should go to Your application folder
where placed root files of Your application in current situation
 it's Redmine root directory,
after start process in background by this command:

# Start foo on port 4000
$ cd /webapps/foo
$ passenger start —daemonize —address 127.0.0.1 —port 4000

# Start bar on port 4010
$ cd /webapps/bar
$ passenger start —daemonize —address 127.0.0.1 —port 4010

Link: Original article

Screenshot_13

CSS FOR Price:

color: #000;
position: relative;
font-weight: 600;
font-family: Arroyo,Arial,Verdana;
font-size: 73px;
line-height: 100px;
font-style: italic;
text-shadow: 2px 2px #fff, -2px 2px #fff, -2px -2px #fff, 2px -2px #fff, 0 5px 5px grey;

 

CSS FOR Price, decimal

font-size: 43px;
position: relative;
top: -24px;
line-height: 95px;

If you’ve never tried one of the escape rooms in Tallinn, you’re missing out.

I know what you’re thinking. Why should you try something new – possibly something you’ve never heard of?

Maybe you already have a list of activities you enjoy with your family or your mates. Or maybe the idea of an “escape game” or “exit room” sounds too weird.

Well, my friend – it’s time to disrupt your routine.

Read the rest of this entry »

Linux commands

How to Activate Mod_Rewrites:
sudo a2enmod rewrite

How to enable new-composed virtual-host config
(site-name.conf - filename which Your composed in "site-available" folder in directory "/etc/apache2"):

a2ensite site-name.conf

 

Install Apache — server:

apt-get install apache2

Add  repository for php packages:

add-apt-repository ppa:ondrej/php

Install php version 5.6:

apt-get install php5.6

apt-get install php5-cli

Very important module without it  I can’t work with *.php files, they just download.
apt-get install libapache2-mod-php5

 

Also don’t forget install additional php modules for work with mysql, images, curl…. etc.

php5-curl

php5-gd

php5-mysqlnd

All available list here : http://packages.ubuntu.com/search?keywords=php5-&searchon=names&suite=trusty&section=all

Create new user for MySQL DB from command line with name 'username' and password 'password':
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

Create database from linux (Ubuntu, CentOS) with name 'mydb' and charset 'utf8' and collate 'utf8_general_ci'
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; 

Give rights for all tables in 'mydb' for user 'username' with password 'password'

GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password';

Update rights:

FLUSH PRIVILEGES;

Запаковать файл GZIP:

gzip testdumpbd.sql

 

Распаковать(разархивировать) файл с раширением «.gz»:

gzip -d filename.gz

 

Создание Символьной Ссылки (symbol link):

ln -s /path/to/file /path/to/symlink