Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # = root
- $ = www user
- ? = client machine root
- 1] # iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT -d 192.168.1.10 --to-port 8080
- 2] # iptables -t nat -A POSTROUTING -j MASQUERADE --src-range 192.168.1.0-192.168.1.255
- 3]
- ? echo 127.1.1.1 test.com www.test.com >> /etc/hosts
- # mkdir -p /home/www/www.test.com
- # chown www-data:www-data /home/www/www.test.com
- $ echo \<VirtualHost *:80\>\
- ServerName www.test.com\
- ServerAlias www.test.com\
- DocumentRoot /home/www/www.test.com\
- \</VirtualHost\> > /etc/apache2/sites-available/www.test.com.conf
- # echo \<Directory /home/www/www.test.com/\>\
- Options Indexes FollowSymLinks\
- AllowOverride None\
- Require all granted\
- \<\/Directory\> >> /etc/apache2/apache2.conf
- # a2ensite www.test.com
- 4]
- # apt-get install php5 libapache2-mod-php5 && service apache2 restart
- $ echo \<\?php phpinfo\(\)\; \?\> > /home/www/www.test.com/test.php
- 5] # update-rc.d apache2 disable
- 6] # apt-get install mc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement