default.conf or what you want
vim /etc/nginx/conf.d/default.conf
add proxy_set_header for php files
| #If you are receiving complaints against your server for outgoing xmlrpc brute-force attack, then you can easily find-out culprit account by using below steps: | |
| 1) Run below command in 'Screen', it will dump all the monitored logs to /home/logs/tcpdump14022016 file. | |
| tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' > /home/logs/tcpdump14022016 | |
| 2) Set up below crons on the server. You can either set up these crons in the server crons i.e at crontab -e or you can set it up at /etc/cron.d/filename, for e.g. as in below case filename is "dumplogs". | |
| root@test[/etc/cron.d]# cat dumplogs | |
| * * * * * root /home/logs/writelogs.sh | |
| * * * * * root sleep 30; /home/logs/writelogs.sh |
| # Run the last command as root | |
| sudo !! | |
| # Serve current directory tree at http://$HOSTNAME:8000/ | |
| python -m SimpleHTTPServer | |
| # Save a file you edited in vim without the needed permissions | |
| :w !sudo tee % | |
| # change to the previous working directory | |
| cd - | |
| # Runs previous command but replacing | |
| ^foo^bar |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
Pre-installation from live OS
This setup of Ubuntu with LUKS and LVM is tested on Ubuntu 18.04.
Boot Ubuntu from a Live OS and select the option to try Ubuntu without installing. Follow the steps I've outlined below. Let's assume you're installing to /dev/nvme0n1.