Since Tails runs from a CDROM, as soon as you reboot, all you configuration and web content will be gone. But, you can get it working.
Tails puts some heavy restrictions on outgoing network packets. You'll have to explicitly allow outgoing packets to port 8080 on the loopback device.
# iptables -I OUTPUT -o lo -p tcp --dport 8080 -j ACCEPT
AlsoAfter this, Tails will put some environment variables in your shell. Curl uses theseyou should be able to send http(s) requestsconnect to your hidden server through polipotor.
root@amnesia:~# env | grep# -icat proxy
http_proxy=http://127.0.0.1:8118
GIT_PROXY_COMMAND=/usr/local/bin/connect-socks
HTTPS_PROXY=http:var/lib/127.0.0.1:8118
https_proxy=http:tor/http_service/127.0.0.1:8118hostname
HTTP_PROXY=http://127.0.0a23a7jqil5dkimu2.1:8118onion
After adding this IPtables rule and unsetting the environment variables, you'll be able to connect to your web server.
# curl http://localhosta23a7jqil5dkimu2.onion:8080
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>
If you leave the proxyTails will put some environment variables there, then you can connect toin your hidden service through torshell. Curl uses these to send http(s) requests through polipo
#root@amnesia:~# catenv /var/lib/tor/http_service/hostname
a23a7jqil5dkimu2.onion
#| exportgrep -i proxy
http_proxy=http://127.0.0.1:8118
# export GIT_PROXY_COMMAND=/usr/local/bin/connect-socks
HTTPS_PROXY=http://127.0.0.1:8118
# export https_proxy=http://127.0.0.1:8118
# export HTTP_PROXY=http://127.0.0.1:8118
If you want to connect directly to your webserver, then unset these environment variables.
# unset http_proxy HTTPS_PROXY https_proxy HTTP_PROXY
# curl http://a23a7jqil5dkimu2.onionlocalhost:8080
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>