Shiny server running on localhost can't be accessed from web when redirected by apache
Roughly following this guide https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy (but with apache2)
I have had success in using apache2 as a reverse proxy for shiny server when following that guide in detail, in particular the last examples. In your case, you should replace
ProxyPass "/myapp" "http://localhost:2224"
ProxyPassReverse "/myapp" "http://localhost:2224"
with
RedirectMatch permanent ^/myapp$ /myapp/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /myapp/(.*) ws://localhost:2224/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /myapp/(.*) http://localhost:2224/$1 [P,L]
ProxyPass /myapp/ http://localhost:2224/
ProxyPassReverse /myapp/ http://localhost:2224/
Header edit Location ^/ /myapp/
ProxyRequests Off
Run R Shiny App on Apache Server
So you don't run a Shiny app on Apache, Shiny Apps must be run on a Shiny Server. You have several options for deploying a Shiny app to your website. The simplest approach is to publish your app to shinyapps.io then add an IFrame to your website that will display your deployed Shiny app.
Since you have asked about how to run a Shiny App on Apache, I assume you want to deploy your own Shiny Server, which can be deployed on the same machine as your Apache server or on a different machine. Instructions for doing this may be found here: https://www.rstudio.com/products/shiny/download-server/
Once you shiny server is installed you will need to publish your app there. This is accomplished by moving your r files to the appropriate location on your Shiny Server. For details see: http://docs.rstudio.com/shiny-server/#host-a-directory-of-applications-1
Once you have done this and have your app running on Shiny Server, you need to set up Apache(Nginx or another webserver) to act as a proxy to Shiny Server. Here is a link that walks you through the steps: https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy
If you have not done this before and do not have experience with Linux or servers, I would expect it to take at least 4 hours.
Related Topics
Using Ggplot for Scattering Dots
How to Convert Ensembl Id to Gene Symbol in R
Compare If Two Dataframe Objects in R Are Equal
Specifying Column Types When Importing Xlsx Data to R with Package Readxl
Traceback() for Interactive and Non-Interactive R Sessions
Using Dplyr for Frequency Counts of Interactions, Must Include Zero Counts
Aggregating Sub Totals and Grand Totals with Data.Table
How to Create a Range of Dates in R
How to Install Dependencies When Using "R Cmd Install" to Install R Packages
Gathering Wide Columns into Multiple Long Columns Using Pivot_Longer
Warning: Non-Integer #Successes in a Binomial Glm! (Survey Packages)
Predicting Lda Topics for New Data
Extract Random Effect Variances from Lme4 Mer Model Object
R Change All Columns of Type Factor to Numeric
Most Mature Sparse Matrix Package for R
Ggplot/Mapping Us Counties - Problems with Visualization Shapes in R