Share your repls and programming experiences

← Back to all posts
Apache Server on Repl.it!
programmeruser


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!

Voters
ABOS2020
Polo1245Ofi
Baconman321
programmeruser
Comments
hotnewtop
ABOS2020

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.

programmeruser

@ABOS2020 what's in the logs?

ABOS2020

@programmeruser apache.log (it is copied from here) or what console shells when I run "bash apache2/start-apache.sh" command?

programmeruser

@ABOS2020 apache.log

ABOS2020

@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.

UCYT5040

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.

programmeruser

@UCYT5040 change $APACHE_DOCUMENT_ROOT

UCYT5040
programmeruser

@Baconman321 PHP now works.

Baconman321

@programmeruser Oh, cool!

Baconman321

@programmeruser It's a shame that people don't care about PHP :(

Battledash2

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

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.

Battledash2

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

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).

Battledash2