2

I'm working in a react-js project and I have a cloud server which has installed apache server. My question is could I set my react-project on apache server?.

3
  • 3
    React.js is principally a browser-based technology. And as such the type of server does not make a difference. If you want to server side render in node.js, then you could still proxy through apache. So, I don't see any limit there. Commented Aug 19, 2016 at 18:54
  • for React router 4. see it may help Commented Sep 22, 2018 at 17:12
  • This might help you: stackoverflow.com/questions/42461279/… Commented Apr 16, 2019 at 5:02

3 Answers 3

4

As Davin Tyron says, react is a browser technology, this is that aside from the client's browser downloading the app from your server, everything happens on client's computer.

Just make sure your apache (or any other server) serves the proper html and js files for your react app to run!

Sign up to request clarification or add additional context in comments.

Comments

0

You must change apache config file with code <VirtualHost *:80> DocumentRoot/Users/Your User Name/Sites/ <Directory"/Users/Your User Name/Sites/"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>

1 Comment

That because Apache server work on port 80, but node and express work default on port 3000. For that is need this and other settings, how you can get proximity for showing node-react app. Or make react application without use node.
-6

No you can't set your project on apache server. I think you have to use Docker for such type of thing.

Does that make sense? React is just a front end library, which is used for making reusable UI components.

1 Comment

Yes, you can. As you say, React.js is just a javascript view library (like jQuery, Angular ...etc), an Apache server is made to serve ressources to client (ressources like HTML, CSS, JS). After the client have receive this files/data, his browser is able to compile them and show him the page he want to see.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.