This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Short note on how to manage multiple sites with SSL from Nginx | |
make domainOne.com domainTwo.com file in | |
/etc/nginx/sites-available | |
Contents of domainOne.com will look like this once done | |
server { | |
server_name domainOne.com www.domainOne.com; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Create a droplet ## | |
Fortunately, DigitalOcean has a one-click image with Docker pre-installed on Ubuntu 14.04 use this link to create new droplet. | |
https://www.digitalocean.com/features/one-click-apps/docker/ | |
# Install the GitLab Runner # | |
First, login to the new droplet via SSH and verify that Docker is installed with: | |
`docker info` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to upload file to s3 bucket. | |
var AWS = require('aws-sdk'); | |
AWS.config = new AWS.Config(); | |
AWS.config.accessKeyId = "XXX"; | |
AWS.config.secretAccessKey = "XXXXX"; | |
AWS.config.region = "ap-south-1"; | |
var s3 = new AWS.S3(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Install Node.js** | |
cd ~ | |
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh | |
sudo bash nodesource_setup.sh | |
sudo apt-get install nodejs | |
sudo apt-get install build-essential | |
**Install Nginx** | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add - | |
2. echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" | sudo tee -a /etc/apt/sources.list | |
3. sudo apt-get update && sudo apt-get install ajenti | |
4. sudo service ajenti restart | |
5. access using https://your-ip:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl pkcs12 -in Certificates2.p12 -out pushcert.pem -nodes -clcerts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For windows | |
first, find process id using his port | |
netstat -a -n -o | find "123456" | |
then, kill the process by id | |
taskkill /F /PID 3312 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I followed these two blogs to install server | |
1. http://koo.fi/blog/2015/03/19/openstreetmap-nominatim-server-for-geocoding/#Compile_Nominatim | |
This explains ( and is the main blog which I followed) various steps | |
2. https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04 | |
This explains how to setup swap files and install tiles if needed. | |
I will use Ubuntu 14.04 LTS as the platform. Just a basic install with ssh server. We will install Apache to serve http requests. Make sure you have enough disk space and RAM to hold the data and serve it efficiently. I used the Finland extract, which was about a 200 MB download. The resulting database was 26 GB after importing, indexing and adding Wikipedia data. The Wikipedia data probably actually took more disk space than the OSM data. My server has 4 GB RAM, which seems to be enough for this small data set. | |
1. Sofware requirements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost IP:80> | |
ServerName xyz.com | |
ServerAlias www.xyz.com | |
DocumentRoot /var/www/xyz/data/www/xyz.com | |
ServerAdmin webmaster@xyz.com | |
DirectoryIndex index.html index.php | |
<!--------------- stuff which is placed in this file | |
ProxyRequests off | |
<Proxy *> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM move into the backups directory | |
CD C:\backup | |
REM Create a file name for the database output which contains the date and time. Replace any characters which might cause an issue. | |
set filename=database %date% %time% | |
set filename=%filename:/=-% | |
set filename=%filename: =__% | |
set filename=%filename:.=_% |
NewerOlder