It can be run with a traditional server setup, there are certain pitfalls because most Apache, PHP + MySQL setups aren't intended for the kind of privacy that some onion services require.
However, offering an onion service for an already public website should be a simple task.
Essentially Tor just points the onion service at some endpoint, e.g. 127.0.0.1:80
and any connections made to the onion service tor will create a connection to your chosen endpoint for and ferry the connection data back and forth.
So adding a simple hidden service configuration to your torrc:
HiddenServiceDir /var/lib/tor/onion
HiddenServicePort 80 127.0.0.1:80 # Port 80 on the onion corresponds to localhost port 80
Then ensure your webserver treats the .onion virtualhost as expected (the address will be written to /var/lib/tor/onion/hostname
) and that should be enough to get it to work.
If you have requirements of the webservice being anonymous then I'd strongly recommend at both containing it by VM or some other container and using a restrictive firewall to block accidental network leaks. See the RiseUp Hidden Service Best Practises too.