Bitcoin Forum
October 21, 2017, 01:49:45 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Cryptocurrency Trading Platform  (Read 6814 times)
AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 02:47:01 AM
 #1

https://github.com/AdamCox9/nickelbot

The goal of this venture is to build a trading platform that provides a consistent interface across all digital currency exchanges. Currently there are almost 25 or more different exchanges doing the same thing. According to Coinmarketcap.com, the current market cap for cryptocurrencies is over $8 Billion and the 24hour trade volume for March 21 is $92 Million. This platform will make it easier for a developer to write a bot once and use it on any exchange. This will also allow for existing bots to be ported to work across all of the exchanges. It will not be hard to port an existing bot designed for a specific exchange to this platform and have it work across all the exchanges. The platform will have all functionality available from any API. Developers will easily be able to choose which of the exchanges they would like their bot to be executed on by editing their configuration file accordingly.

An example bot would be a piece of software that trades automatically. A bot would execute on a web server and communicate with an exchange over the web to initiate buy or sell orders based on certain conditions. For example, a bot would continuously poll an exchange for the price of, say, Bitcoin. As Bitcoin is just one of the many cryptocurrencies on the market today. For example, if the volume increases by 1% and the price increases by 1% in an hour, then the bot would initiate a buy order on the hopes that the price will continue to surge. The bot can send commands to an exchange in real-time without a person making any actions. There are many data mining and artificial intelligence techniques that could be incorporated into these bots - basically, they need to maximize profits from buying an asset low and selling high. Sometimes Bitcoin price fluctuates from $350 to $375 and back in one day, if a bot performs well enough based on the programmer’s techniques, it would be able to buy at $350, sell at $375 and then buy back at $350 thus increasing the wealth of the bot's owner.

Bots are currently very common in the world of cryptocurrency trading for the exchanges. The venture would be a platform or library of code that would provide a standard set of function calls that would work across all of the exchanges. There are many other bots that interact with most of the popular exchanges, but nothing that works across multiple exchanges. Currently it looks like most bots interact directly with each exchange's application program interface (API) natively, which adds a lot of extra work for the developers. This platform would be similar to how jQuery provides a standard interface for all of the web browsers so that developers do not have to write custom JavaScript code for each browser natively.

Creating bots on this platform will be beneficial to traders because they will be able to create a large number of custom orders across all of the exchanges very easily. The platform will provide many utility functions for calculating attributes such as highs, lows, volumes, exponential moving average (ema), etc... for any specified period of time. The platform will also make it easier for developers to build reports of their trading activity. This platform allows a developer to easily get statistics and summaries from each exchange in the same format. This allows the developer to perform detailed analysis. It will be an agenda to keep the platform scalable to allow for adding more functionality and to allow multiple developers to contribute while not breaking existing bots. The consistent interface and unit tests will help ensure integrity in the platform.

The source of this platform will be free and open-source in order to gain rapid popularity. Making the source open will allow other developers to help build this platform as they will be rewarded for their contributions because of the nature of GitHub. GitHub is where people build software. More than 12 million people use GitHub to discover, fork, and contribute to over 31 million projects. Many clients check a developer’s GitHub profile before hiring them. So, developers that contribute here will have a provable background in developing trading bots for virtual currencies. If this platform ever becomes popular there will be a lot of opportunity for growth. Making the platform free will allow many people to access the platform and will encourage use and growth of the platform. It will be essential to get other developers to contribute to the platform as well as build and publish their own bots. Developers will be able to build bots to be used on this platform and sell them for profits. Since it will be such a large amount of work to maintain this large platform, it will be necessary for developers to participate in the maintenance and development of this project.

The detailed theory behind this platform starts by exposing all of the functionality from each of the crypto trading exchanges with a consistent interface. This allows for developers to quickly write a bot that works on all of the exchanges instead of learning each separate API and writing a bot for each exchange. Each adapter will return the same output for each function, respectively, as any other adapter for the other exchanges. There will be unit tests that test each adapter and test the native API’s for each exchange so that it will be easier to debug and verify correct functionality. It will be important to maintain the full functionality offered by each exchange and make sure exchanges that don't support some functionality do so gracefully. For example, only some exchanges offer margin trading - adapters that don't support margin trading functionality shall respond with appropriate error codes/messages and the bots will handle these appropriately.

The platform will be attractive for new exchanges since they will want their API included in our platform. This may encourage exchanges to contribute to the platform by creating a library and adapter class for their exchange. Developers that have built a bot for a specific exchange that is not yet covered in the platform may contribute by integrating the API for the exchange into the platform. Developers may have a successful bot for a specific exchange that they may want to use on other exchanges or possibly sell their bot.

The primary target audience and opportunity of this application will be existing traders that have experience in software development and would be interested in PHP or existing PHP developers that are interested in trading crypto-currencies. The bot will not be exclusively targeted for these types of groups - it should have a simple graphical user interface (GUI) that will allow easy set-up and execution of pre-built bots so that anybody will have access to its’ abilities. It will also allow for the non-developer type of user be able to buy and install 3rd-party bots. This is an example of a large stream of revenue for this free and open-source platform.

There will be plenty of example bots to get the beginner started in no time. It will still be easy for a developer to build bots that have specific behavior for specific exchanges since each exchange might require different strategies. This platform will allow the developer to easily build a wide range of trading bots and have plenty of reference bots to get started from.

If someone needs to liquidate a digital asset, they will be able to find the most profitable way to do it. They can easily create a bot to sell it at an expected percentage above the current price. They can distribute the sale across all the exchanges to maximize the potential liquidity available.

1508550585
Hero Member
*
Offline Offline

Posts: 1508550585

View Profile Personal Message (Offline)

Ignore
1508550585
Reply with quote  #2

1508550585
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508550585
Hero Member
*
Offline Offline

Posts: 1508550585

View Profile Personal Message (Offline)

Ignore
1508550585
Reply with quote  #2

1508550585
Report to moderator
1508550585
Hero Member
*
Offline Offline

Posts: 1508550585

View Profile Personal Message (Offline)

Ignore
1508550585
Reply with quote  #2

1508550585
Report to moderator
bonker
Hero Member
*****
Offline Offline

Activity: 546



View Profile
April 01, 2016, 03:57:01 AM
 #2

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange

Pies
AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:00:44 AM
 #3

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange

No, I created a platform https://github.com/AdamCox9/nickelbot and this post is announcing it.



tl;dr NickelBot is a newly launched trading platform written in PHP that provides a standard API for the major exchanges.

shintosai
Hero Member
*****
Offline Offline

Activity: 644



View Profile
April 01, 2016, 04:03:15 AM
 #4

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange
thanks for this mate, I'm reviewing it right now I hope OP
find this reply helpful but for me as a new in trading
this share is enough for me start and make some profits.

crossabdd
Hero Member
*****
Offline Offline

Activity: 770



View Profile
April 01, 2016, 04:04:55 AM
 #5

hope your aplication release soon, anyway where the market can use with your bot trading..? poloniex..? bittrex..?

bonker
Hero Member
*****
Offline Offline

Activity: 546



View Profile
April 01, 2016, 04:06:24 AM
 #6

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange

No, I created a platform https://github.com/AdamCox9/nickelbot and this post is announcing it.



tl;dr NickelBot is a newly launched trading platform written in PHP that provides a standard API for the major exchanges.

Ok.. so how is it different from https://github.com/timmolter/XChange?

other than being 1) incomplete 2) written in php

Pies
AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:08:22 AM
 #7

hope your aplication release soon, anyway where the market can use with your bot trading..? poloniex..? bittrex..?

Right now it supports Bitfinex, Bitstamp, Bittrex, Btc-e, Bter, Coinbase, and Poloniex

It is already released: https://github.com/AdamCox9/nickelbot

Just cp config.php to config_safe.php with your API Keys/Secrets and run php ultimato.php and that will run the make_min_orders.php bot.

This will create a min buy order and sell order for every currency on every exchange if balances permit.

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:10:45 AM
 #8

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange

No, I created a platform https://github.com/AdamCox9/nickelbot and this post is announcing it.



tl;dr NickelBot is a newly launched trading platform written in PHP that provides a standard API for the major exchanges.

Ok.. so how is it different from https://github.com/timmolter/XChange?

other than being 1) incomplete 2) written in php

It can address some issues on the web that might be more difficult to deal with in Java. PHP is a little bit easier to program with than Java.

bonker
Hero Member
*****
Offline Offline

Activity: 546



View Profile
April 01, 2016, 04:12:45 AM
 #9

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange

No, I created a platform https://github.com/AdamCox9/nickelbot and this post is announcing it.



tl;dr NickelBot is a newly launched trading platform written in PHP that provides a standard API for the major exchanges.

Ok.. so how is it different from https://github.com/timmolter/XChange?

other than being 1) incomplete 2) written in php



It can address some issues on the web that might be more difficult to deal with in Java. PHP is a little bit easier to program with than Java.

Fair point

... Java is a tropical pig strung out on crack

Pies
crossabdd
Hero Member
*****
Offline Offline

Activity: 770



View Profile
April 01, 2016, 04:19:07 AM
 #10

hope your aplication release soon, anyway where the market can use with your bot trading..? poloniex..? bittrex..?

Right now it supports Bitfinex, Bitstamp, Bittrex, Btc-e, Bter, Coinbase, and Poloniex

It is already released: https://github.com/AdamCox9/nickelbot

Just cp config.php to config_safe.php with your API Keys/Secrets and run php ultimato.php and that will run the make_min_orders.php bot.

This will create a min buy order and sell order for every currency on every exchange if balances permit.
where the .exe..? how to instal it..?
how to use it..? can you share the tutorial how to instal it.? Im use windows 10 pro

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:21:15 AM
 #11

hope your aplication release soon, anyway where the market can use with your bot trading..? poloniex..? bittrex..?

Right now it supports Bitfinex, Bitstamp, Bittrex, Btc-e, Bter, Coinbase, and Poloniex

It is already released: https://github.com/AdamCox9/nickelbot

Just cp config.php to config_safe.php with your API Keys/Secrets and run php ultimato.php and that will run the make_min_orders.php bot.

This will create a min buy order and sell order for every currency on every exchange if balances permit.
where the .exe..? how to instal it..?
how to use it..? can you share the tutorial how to instal it.? Im use windows 10 pro


I have not set it up on Windows. I set it up on a Linux Virtual Machine at web hosting company.
However, to install it on Windows 10, it would go something like:
Download PHP and Apache. You can also use WAMP http://www.wampserver.com/
Download NickelBot zip file and put it in a web folder: https://github.com/AdamCox9/nickelbot/archive/master.zip
Unzip it.
Copy config.php to config_safe.php with your API Keys/Secrets.
Run the ultimato.php script.

coinableS
Legendary
*
Offline Offline

Activity: 1036



View Profile WWW
April 01, 2016, 04:26:49 AM
 #12

Great work and thanks for contributing to the community! I think you should maybe post this in the Project Development section if you are looking for a community build-out. From a quick glance over of the code it looks like it's not functional yet?  You've got a nice collection of PHP classes for a bunch of a different exchanges which is a great start, but a lot of the directories, files and some functions aren't built out yet.

I've always loved PHP, but I wondered if average users could use a PHP interface since it requires a server and use of cron jobs to automate a trading bot.  I figured end-users would prefer something they could run locally.  For example the recent 1broker windows trading app written in C (http://austeritysucks.com/1broker-trading-app-api.html)

It's funny around the same time you started your repo, I wrote my first PHP class for bitfinex's API, but the bot portion was not profitable.  Earlier this week I created a bot that when back tested 52% of it's trades are profitable(https://coinables.website/kytobot). I'm not ready to release the code yet...

I think this might be something I would be interested in contributing to.

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:29:14 AM
 #13

Great work and thanks for contributing to the community! I think you should maybe post this in the Project Development section if you are looking for a community build-out. From a quick glance over of the code it looks like it's not functional yet?  You've got a nice collection of PHP classes for a bunch of a different exchanges which is a great start, but a lot of the directories, files and some functions aren't built out yet.

I've always loved PHP, but I wondered if average users could use a PHP interface since it requires a server and use of cron jobs to automate a trading bot.  I figured end-users would prefer something they could run locally.  For example the recent 1broker windows trading app written in C (http://austeritysucks.com/1broker-trading-app-api.html)

It's funny around the same time you started your repo, I wrote my first PHP class for bitfinex's API, but the bot portion was not profitable.  Earlier this week I created a bot that when back tested 52% of it's trades are profitable(https://coinables.website/kytobot). I'm not ready to release the code yet...

I think this might be something I would be interested in contributing to.

It is definitely under construction but it is functional. The make_min_orders.php bot works.

I put the docs on the homepage: http://www.nickelbot.com/

Here it is on github: https://github.com/AdamCox9/nickelbot/blob/master/gui/index.html

EDIT: updated links and doc location

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:34:03 AM
 #14

Nice Wall Of text Buddy 10/10

Is This The Project You Are Looking For: https://github.com/timmolter/XChange

No, I created a platform https://github.com/AdamCox9/nickelbot and this post is announcing it.



tl;dr NickelBot is a newly launched trading platform written in PHP that provides a standard API for the major exchanges.

Ok.. so how is it different from https://github.com/timmolter/XChange?

other than being 1) incomplete 2) written in php



It can address some issues on the web that might be more difficult to deal with in Java. PHP is a little bit easier to program with than Java.

Fair point

... Java is a tropical pig strung out on crack

Also, this includes a website with it. Its up and running here: http://www.nickelbot.com/ Hopefully developers can set-up there own website and build out there own web tools. I am building a bot shop so developers can build there own bots and sell them. It even makes bitcoin tx sounds.

EDIT: removed broken links

coinableS
Legendary
*
Offline Offline

Activity: 1036



View Profile WWW
April 01, 2016, 04:52:23 AM
 #15

Ah okay, sorry I wasn't sure if it was functional yet.
What's the purpose of the audio output with the websocket txs?  It seems out of place for a trading platform IMO.

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 04:54:20 AM
 #16

completely unrelated. But, this project will have a "ready to go" website included with it.

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 05:20:10 AM
 #17

I think this might be something I would be interested in contributing to.

coinableS,

That would be great if you could contribute. The benefit to you is that you can create bots for the platform and sell them or do whatever you want with them.

I have plenty of ideas for web apps and trading bots that could be built.

I'm hoping that many businesses are created utilizing the common platform.

Here are some ideas in the names of files in the bot folder: https://github.com/AdamCox9/nickelbot/tree/master/bots

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 07:16:13 AM
 #18

Make sure the top line is changed to your client computer IP if you access it through a browser. It tests to see if you are root if running from the command line, also. You can change that to your username your logged in as if not root.

https://github.com/AdamCox9/nickelbot/blob/master/config.php

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 10:24:06 AM
 #19

I added an address generator bot. It will generate a deposit address for each wallet for each currency on each exchange.

I added it to the home page of my site: http://www.nickelbot.com/

Wait for it to load and it should auto populate. It makes an AJAX call from index.php to http://www.nickelbot.com/api/index.php?exchange=Poloniex&action=deposit_addresses

You can see the files on github. This is the initial prototype for the API: https://github.com/AdamCox9/nickelbot/blob/master/api/index.php
It will be formalized soon. Here is a bot that uses the platform to generate the deposit addresses: https://github.com/AdamCox9/nickelbot/blob/master/bots/make_deposit_addresses.php

Feel free to donate your extra coins to the addresses returned in the API call or on the front page of the website!

EDIT: updated links; made more clear

AdamCox9
Member
**
Offline Offline

Activity: 104

To the moon!


View Profile WWW
April 01, 2016, 07:28:05 PM
 #20

These are some of my notes and stuff I use to set-up a Linux server if this will help anyone getting started.


/*****
   Building Fedora 21
*****/

rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-*

yum update -y
yum install nano mlocate -y
updatedb

tar -zcvf dir.tar.gz /path/to/dir
tar -zxvf dir.tar.gz

EDITOR=nano
export EDITOR


/*****

   SSH

 *****/

nano -wS /etc/ssh/sshd_config
#uncomment line #Port 22 and change to Port up to 65000

/*****
   Web Server
 *****/

yum groupinstall -y "Web Server" "MySQL Database" "PHP Support"
yum install -y php-simplexml php-mysql
apachectl start
chkconfig httpd on
systemctl list-unit-files
ln -s target_path link_path
tail -f -n 222 /var/log/httpd/access_log
tail -f -n 222 /var/log/httpd/error_log
chmod -R 777 /mnt/vol2/cache

nano -wS /etc/httpd/conf/httpd.conf
   ErrorDocument 404 /not-found.html
   <VirtualHost *:80>
       ServerAdmin adam.cox9@gmail.com
       ServerName nickelbot.com:80
       ServerAlias www.nickelbot.com *.nickelbot.com
       DocumentRoot /var/www/www.nickelbot.com
       ErrorLog logs/www.nickelbot.com-error_log
       CustomLog logs/www.nickelbot.com-access_log common
   </VirtualHost>

/*****
   IP Tables
   /etc/sysconfig/iptables-config
 *****/

iptables -L
iptables -F

iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 465 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 995 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 143 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 993 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 22692 -j ACCEPT
#iptables -A INPUT -p tcp -m tcp --dport 22 -j DROP #make sure to log-in on port up to 65000 port first...then save this
iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P INPUT DROP
iptables -L -n

#save & restore
iptables-save > /etc/sysconfig/iptables
iptables-restore < /etc/sysconfig/iptables

#Load on start-up:
nano -wS /etc/rc.d/rc.local
   /sbin/iptables-restore < /etc/sysconfig/iptables
   

/*****
   Database
 *****/

yum install mysql mysql-devel mysql-server -y
service mysqld start
mysqladmin -u root password blahblahblah
chkconfig mysqld on

#for back up
mysqldump --opt -u root -p wpbitcoinusd  > .htdbbackup2.sql


/*****
   Github - Get the public and private key from github.com
 *****/

yum install github -y
git config --global user.email "adam.cox9@gmail.com"
git config --global user.name "Adam Cox"

nano -wS /root/.ssh/github_rsa
nano -wS /root/.ssh/github_rsa.pub
chmod 400 /root/.ssh/github_rsa
nano -wS ~/.ssh/config
  Host github.com
  IdentityFile ~/.ssh/github_rsa
git clone git@github.com:AdamCox9/nickelbot.git
git config --global user.name "AdamCox9"
git config --global user.email "adam.cox9@gmail.com"
git clone git@github.com:AdamCox9/nickelbot.git
git clone git@github.com:AdamCox9/nickelbot.git

git submodule init
git submodule update

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,FB00E32A6B7CFFB8DC2EB9BE23459081

-------
-----END RSA PRIVATE KEY-----

#public key:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpcEw8cW3anzntlsb0Pa3MMTSLeDuCUDHhNilwcMnoJKYoXd8 9LyUrqf8eDzNXTAZSwkjnDKWpa6oR3c04ASkYXhoMhBptLpOjYYW9x4GklYMjRGgMkdc0nIJkZ4OE4R 5QprKSLo9G/ORu3Afm58GfFgi7UmW5wte8GBkG8NTU5OvmS6Po36EQKRGkI+86KhOG5jWSl7bcM2b/oEU0FvikwmZkV/92VHZpA460G/z/0COwmfb1U5tG/LXGxz3aAtBLxtqkak9BmLcFtigZWPmZkHSoyCt9ubCbWKZtXSe0De8WFjpMyjVJyN5d1I50WAqc8UWxJAulcfVMQrycxyu5 adam.cox9@gmail.com

/*****

   Swap

 *****/

dd if=/dev/zero of=/swapfile bs=1024 count=2097152
mkswap /swapfile
swapon /swapfile
nano -wS /etc/fstab
   /swapfile swap swap defaults 0 0
free
cat /proc/swaps

/*****

   HTTPS

 *****/

yum install mod_ssl openssl
openssl genrsa -out ca.key 2048
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

cp ca.crt /etc/pki/tls/certs/
cp ca.key /etc/pki/tls/private/
cp ca.csr /etc/pki/tls/private/

cat /etc/pki/tls/certs/ca.crt
cat /etc/pki/tls/private/ca.key
cat /etc/pki/tls/private/ca.csr

nano -wS /etc/httpd/conf.d/ssl.conf
   ### overwrite the following parameters ###
   SSLCertificateFile /etc/pki/tls/certs/ca.crt
   SSLCertificateKeyFile /etc/pki/tls/private/ca.key

   ### The following parameter does not need to be modified in case of a self-signed certificate. ###
   ### If you are using a real certificate, you may receive a certificate bundle. The bundle is added using the following parameters ###
   SSLCertificateChainFile /etc/pki/tls/certs/example.com.ca-bundle
service httpd restart
nano -wS /etc/httpd/conf/httpd.conf
   NameVirtualHost *:80
   <VirtualHost *:80>
       ServerAdmin email@example.com
       DocumentRoot /var/www/html/virtual-web
       ServerName virtual-web.example.com
   </VirtualHost>
   NameVirtualHost *:443
   <VirtualHost *:443>
      SSLEngine on
      SSLCertificateFile /etc/pki/tls/certs/ca.crt
      SSLCertificateKeyFile /etc/pki/tls/private/ca.key
      <Directory /var/www/html/virtual-web>
         AllowOverride All
      </Directory>
      ServerAdmin email@example.com
   DocumentRoot /var/www/html/virtual-web
   ServerName virtual-web.example.com
   </VirtualHost>
#Get certificate from CA and copy it into /etc/pki/tls/certs/ca.crt
service httpd restart
#redirect http to https - put redirect line in virtual host for 80:
nano -wS /etc/httpd/conf/httpd.conf
   <VirtualHost *:80>
       ServerAdmin adam.cox9@gmail.com
       DocumentRoot /var/www/html
       ServerName bitcoinusd.info
       Redirect / https://bitcoinusd.info/
   </VirtualHost>

/*****

   Redirect

 *****/

nano -wS /etc/httpd/conf/httpd.conf
    #Redirect www to non-www
    <IfModule mod_rewrite.c>
        Options +FollowSymlinks
        RewriteEngine On
        RewriteCond %{HTTPS} !=on
        RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
        RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
    </IfModule>
    #Redirect www to non-www
    <IfModule mod_rewrite.c>
        Options +FollowSymlinks
        RewriteEngine On
        RewriteCond %{HTTP_HOST} !^www\.
        RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>


/*****

yum -y update
yum groupinstall -y 'development tools'
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
yum install python

*****/

/*****

   CRON

 *****/


crontab -e
* * * * *       php /var/www/example.php > /var/www/data.out
minute|hour|day of month|month|day of week

/*****

   Use Key to SSH into Server

 *****/

#TODO

/*****

   Mail server

*****/

#TODO

Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!