Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Here is my apache config.
<VirtualHost *:80>
ProxyPreserveHost On
ServerName 192.168.0.59 # private ip, just for testing purposes
ProxyPass / http://127.0.0.1:8000
ProxyPassReverse / http://127.0.0.1:8000
DocumentRoot /home/marius/.julia/dev/GenieApp
</VirtualHost>
So when I run the GenieApp stand-alone, everything works nicely and this is what I get: But when I access the app via apache2 this is what I get: . So it works, but without the styling. How can I fix this?
![](https://cdn.discordapp.com/attachments/1195831429058269335/1195831429540630710/image.png?ex=65b56bce&is=65a2f6ce&hm=7509eaef1bc4c2fd60fef7a93e46c26066f61f7c7623ac43af9fe9563b4be26f&)
![](https://cdn.discordapp.com/attachments/1195831429058269335/1195831429909725214/image.png?ex=65b56bce&is=65a2f6ce&hm=e73fc5c7116ac5684cb8567bc42a72d1d27d1032b991d29946af83fdccd66ece&)
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Changed the channel name: Works behind Apache2, but no styling
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I have found a goodish documentation on this and managed to make it work:
![](https://cdn.discordapp.com/attachments/1195831429058269335/1195850324263575582/image.png?ex=65b57d67&is=65a30867&hm=8cf03ccf2e12a47ebb43e463d49e7fb9a271e7776ba2e98d72c9cdfa4471ffd8&)
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
server {
listen 80;
listen [::]:80;
server_name 192.168.0.59;
root /home/ubuntu/MyGenieApp/public;
index welcome.html;
location / {
proxy_pass http://localhost:8000/;
}
location /css/genie {
proxy_pass http://localhost:8000/css/genie;
}
location /img/genie {
proxy_pass http://localhost:8000/img/genie;
}
location /js/genie {
proxy_pass http://localhost:8000/js/genie;
}
}
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
the css, images and js made only after I did the modifications above, like: location /css/genie { proxy_pass http://localhost:8000/css/genie; }
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
@Pere , @essenciary am I correct with the updated locations for css, img and js? if so, the documentation shall be changed as well
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
... and obviously this old section with deploying behind nginx shall be part of the new documentation: https://learn.genieframework.com/docs/guides/deploying-genie-apps
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I spend quite a few hours playing with apache2 and nginx. This was my lifesaver page: https://discourse.julialang.org/t/hello-ive-built-a-web-app-using-genie-stipple-and-i-would-like-to-deploy-it-to/54459/5
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Another issue: I have set the wrong root
in the config above. But even if I set it correctly: root /home/marius/.julia/dev/MyGenieApp/public;
, the behavior is the same. I still have to set the /css/genie proxies as above.
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I have found the css, img and js setting useless. The following config is sufficient:
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
server {
listen 80;
listen [::]:80;
server_name 192.168.0.59;
root /home/marius/.julia/dev/MyGenieApp/public;
index welcome.html;
location / {
proxy_pass http://localhost:8000/;
}
}
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
Those settings are only needed when you want to serve static assets with NGINX, so your config is sufficient.
That old guide you found...we actually have an updated version on the current site https://learn.genieframework.com/docs/reference/workflow/nginx-reverse-proxy
but I see that it's not easy to find. I'll link to it from the deployment guide. I'm sorry that you had so much trouble @marius.drulea 🥹
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
ok... that old guide only works for the old Genie style;
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I have tried to use it for thew new stuff('@page(...), ui(), GenieFramework) and it dit not work for me
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I have opened an issue for it: https://github.com/GenieFramework/Genie.jl/issues/700
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
does this work for you?
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
I've tried having Genie apps behind a Traefik reverse proxy and it worked fine, but haven't tested NGINX. It seems we'll have to look into how it handles websockets, thanks for reporting.
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I would say it's worth adding the Traefik config to the doc, beside the nginx config. Same for Apache2.
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
The issue has to do with websocket config. It turns out someone else had run into this
https://discord.com/channels/774897545717219328/1041476306757496853/1041476306757496853
I updated the issue on Github too
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Changed the channel name: Solved Nginx settings to enable websockets