My laptop is running Ubuntu 14.10 desktop and hosting 14.10 server in a libvirt VM (set up using virt-manager). I installed it in minimal virtual server mode with only openssh-server. After installation, I could easily SSH into it and added nginx stable PPA and installed it as well.Here's the problem: browsers say the connection attempt was rejected. It's not a networking issue as I can SSH, but I can't figure out what could be. I didn't go anywhere near iptables or whatever it's successor is called, and it's entire network configuration is thanks to libvirt's default network DHCP.Please feel free to ask about any configuration details you need to know.
nginx web server on VM inaccessible to host
networking;nginx;libvirtd;virt manager
I figured out the issue. As I suspected, it had nothing to do with the networking stack, and the blame fell squarely upon nginx misconfiguration. I purged all the configuration files and reinstalled nginx and as it turned out, there was not one, but two reasons that led to the nginx refusing to work at all.First there was /etc/nginx/sites-enabled/www (the only enabled virtual host); turns out I had two fastcgi_pass defined:location ~ \.php$ {    include snippets/fastcgi-php.conf;    # With php5-cgi alone:    fastcgi_pass 127.0.0.1:9000;    # With php5-fpm:    fastcgi_pass unix:/var/run/php5-fpm.sock;}All was fine in the world, until I edited the following lines into /etc/nginx/nginx.conf under the Basic Settings section:client_max_body_size 4096k;client_header_timeout 10;client_body_timeout 10;keepalive_timeout 10 10;send_timeout 10;Now I've no idea exactly which lines and why they caused the issue, I couldn't be bothered to. I was following an old and outdated guide (published 2012, quite old by IT standards) to set up my web server stack, so moral of the story? Don't blindly follow a guide, and check exactly what each instruction does and it's still relevant on the version of software you're using. Ah, but the fastcgi_pass was my mistake, not due to the guide.