Apache Server on Repl.it!
svg files cannot be displayed: https://upload.wikimedia.org/wikipedia/commons/d/db/Apache_HTTP_server_logo_%282016%29.svg
I've gotten the Apache Server to work successfully on repl.it. (PHP doesn't work currently, for some strange reason it can't find the apache php package.)
Edit: PHP now works!
Edit 3/22/2022: there might be a better solution with Nix, but I haven't got it to work yet (idk how services with Nix work)
I have completely copied the Apache2 folder files onto my project and when I run "bash apache2/start-apache.sh" in shell it works, but here is where the problem exists. The apache thing works for about 5 minutes before it randomly turns off and so to use it again I have to rerun "bash apache2/start-apache.sh." I am no coding expert but your help may save me a lot.
@ABOS2020 what's in the logs?
@programmeruser apache.log (it is copied from here) or what console shells when I run "bash apache2/start-apache.sh" command?
@ABOS2020 apache.log
@programmeruser I don't think anything changed as all I did was copy the files from this repl. BTW I am using html to code, if you believe that might be the problem.
How do I specify the path the server should run in? I have a folder called public, can I just run it in there? I don't want other files seen.
@UCYT5040 change $APACHE_DOCUMENT_ROOT
@programmeruser Thanks!
@Baconman321 PHP now works.
@programmeruser Oh, cool!
@programmeruser It's a shame that people don't care about PHP :(
PHP has potential but everyone is saying that it's either outdated or bad which makes new developers not like it.. It's just all the bad developers giving bad influence on new developers.. @Baconman321
@Battledash2 Yeah.
Personally though, without some other server management service, PHP is kinda bad. I mean, sure it's simple and all, but it needs a server to work with because it is bad at handling redirects and such; Apache is much better with that.
Yeah.. PHP + Apache is good.. But... I'd rather use Node anytime tbh.. PHP is good though, I've made a few websites with it. It was easy to use and straight forward. I'd rather use NodeJS just because I'm more used to it, not because PHP is bad (it's not bad) @Baconman321
@Battledash2 Yeah. In fact, it's a good idea to know it since so many hosting services might offer PHP as a main language (that said, it doesn't meant that you shouldn't learn another language).
Thanks !
@GarrySmith1 you might want to consider making a better version with the new Nix package manager that was added to Replit since this uses old, hacky methods that aren't really the best (though I haven't tried using Nix for this yet).
@programmeruser you should make this with nix, and please, can you tell me how can I add extensions like PDO ?