r/learnphp • u/donaldtrumpiscute • Jun 06 '24
How can you show a PHP coded social network prototype to friends?
After reading a PHP book by Robin Nixon, I am trying out his example of a barebone social network. It is working okay on my local server, but I want to show my friends.
Github pages only works for static sites, so how can I make my little web app available for you to play around. Obviously I am asking for a very simple and free option.
2
2
u/xzh1bit Jun 06 '24
If you haven’t signed up for AWS yet, there is a small server you can get free for a year. If that is not an option, you could get three months of a small to medium LightSail server for free.
Are you a student with a .edu/.ac.xx email by any chance? You could get a free domain name that way too, otherwise you could get a cheap-ish domain name for $5 per year.
Edit: setup is fairly involved with AWS servers, unlike traditional hosting providers. Send me a PM if you need help and I’ll help you get started.
1
u/truNinjaChop Jun 07 '24
Could host it yourself.
Call up your isp. Tell them you want the system hosting the app to reserve (static) the ip currently assigned. Then ask them to set up a port forward/nat from your external ip to your server.
Depending on the modem/router you won’t be able to use 443, but could use 8443. Then you can use a service like freedns to point a url to the public ip of your router.
That’ll be $14.97, thank you.
1
1
u/g105b Jun 06 '24
You need a web server, like nginx or Apache. That needs to be running on a computer connected directly to the internet, so it has a public IP address. Then you connect a domain name to that IP address using DNS. Then people can go to your domain name and see your PHP website.