Advertisement
AbitDeveloper

Debian www apache2 test

Mar 14th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. # = root
  2. $ = www user
  3. ? = client machine root
  4.  
  5. 1] # iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT -d 192.168.1.10 --to-port 8080
  6. 2] # iptables -t nat -A POSTROUTING -j MASQUERADE --src-range 192.168.1.0-192.168.1.255
  7.  
  8.  
  9. 3]
  10. ? echo 127.1.1.1 test.com www.test.com >> /etc/hosts
  11.  
  12.  
  13.  
  14. # mkdir -p /home/www/www.test.com
  15. # chown www-data:www-data /home/www/www.test.com
  16.  
  17. $ echo \<VirtualHost *:80\>\
  18. ServerName www.test.com\
  19. ServerAlias www.test.com\
  20. DocumentRoot /home/www/www.test.com\
  21. \</VirtualHost\> > /etc/apache2/sites-available/www.test.com.conf
  22.  
  23. # echo \<Directory /home/www/www.test.com/\>\
  24. Options Indexes FollowSymLinks\
  25. AllowOverride None\
  26. Require all granted\
  27. \<\/Directory\> >> /etc/apache2/apache2.conf
  28.  
  29. # a2ensite www.test.com
  30.  
  31. 4]
  32. # apt-get install php5 libapache2-mod-php5 && service apache2 restart
  33. $ echo \<\?php phpinfo\(\)\; \?\> > /home/www/www.test.com/test.php
  34.  
  35. 5] # update-rc.d apache2 disable
  36.  
  37. 6] # apt-get install mc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement