It really depends on the size of your implmenetations. Here's a sizing guide for JIRA, https://confluence.atlassian.com/enterprise/jira-sizing-guide-461504623.html
If you can get a server that has enough resources for both combined, it may work, but you still might run into disk IO limits and things like that.
Like Josh said, while it is possible you're causing yourself a performance/possible security issue.
I would highly recommend NOT to do it since if somebody enables local agents on the webapp - it can impair JIRA's performance (compiling code can be quite intense).
Because of the local agents - you might have arbitraty commands being run as well.
Just something to be aware of.
G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events