I have created a small project using Wt(C++ Web Toolkit). and I now want to host it.
- Since there are very sparse resources for this, I read somewhere that LAMP is required for this(since I am using Linux). So after creating an Ubuntu instance at Digital Ocean, I installed my code in it with Apache2, MySql, and PHP. The Apache2 server is working, but it is used for hosting HTML/CSS/JS files. my web page is written entirely in C++.
- I got directed to this website: https://www.webtoolkit.eu/wt/doc/reference/html/overview.html#wthttpd where it mentions "connectors" like
libwthttpandlibwtfcgi. I tried to install them usingaptbut I get this error:E: Unable to locate package libwtfcgi-dev(same for libwthttp). - The website mentioned above also does not provide clear steps for using these connectors.
- I have also looked at other related answers : Host for Wt C++ web framework, deplowment issue but since I am new to web hosting, I would really appreciate a step-by-step guidance.
- Even here: https://redmine.webtoolkit.eu/projects/wt/wiki/Fastcgi_on_apache The language is very unclear ast to where
fastcgi.confis located.
This answer assumes that you have the project running locally and just need to 'get it on the web'. You have a few options...
Reverse Proxy
From the tutorial it looks like there is a built in web-server. One option could be to use this, and then setup a reverse proxy (this can be done through Apache) to map traffic from
yourwebsite.comtohttp://localhost:port, whereportis whatever you started the web-server with.The example they give to start the local webserver is:
here, port would be
9090.Fast CGI
From the hello world and this thread it seems like a webserver setup with FastCGI may be able to do what you are looking for. Maybe this doc from Digital Ocean can help you get started?
It seems unlikely that you specifically need the full LAMP stack (Linux, Apache, MySQL, PHP) specifically for this. The doc you link does suggest that you need to link against the appropriate library for whichever approach you take, libhttpd or libwtfcgi, and you are correct that apt would be the place to get them on Ubuntu. This is a separate issue, but maybe this answer could be a starting point?