Skip to content

Commit 086cc4f

Browse files
committed
Merge pull request #1 from FlorianHeigl/non-root
Update ec2ExistRclocal.template
2 parents 7ce98e5 + 1801049 commit 086cc4f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ansible/templates/ec2ExistRclocal.template

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ echo 'Starting the eXist native XML database from within /etc/rc.d/rc.local ...'
1010
grep 'jetty.port' $EXIST_HOME/tools/jetty/etc/jetty.xml
1111
echo 'Stating with the following max memory (MB)'
1212
grep 'wrapper.java.maxmemory' $EXIST_HOME/tools/wrapper/conf/wrapper.conf
13-
/etc/init.d/exist start
13+
# start as service user
14+
su svcexist -c /etc/init.d/exist start
15+
16+
# add nat rule to forward 8080 to 80. 8080 also accessible with this config.
17+
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
18+
iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
19+
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

0 commit comments

Comments
 (0)