Update README.md
This commit is contained in:
parent
5781542189
commit
f740279454
11
README.md
11
README.md
@ -34,19 +34,20 @@ This project utilizes Apache2 as a reverse proxy to handle incoming web traffic
|
|||||||
|
|
||||||
To set up Apache2 as a reverse proxy for your Node.js app:
|
To set up Apache2 as a reverse proxy for your Node.js app:
|
||||||
|
|
||||||
1. Start your Node.js application (/node/app.js) on port 8003. You can run the application in a tmux session using the command:<br/>
|
1. Start your Node.js application (/node/app.js) on port 8003. You can run the application in a tmux session using the command:\n
|
||||||
|
|
||||||
|
`node app.js`<br/>
|
||||||
|
|
||||||
``` node app.js```
|
|
||||||
|
|
||||||
2. Edit the Apache configuration file /etc/apache2/sites-enabled/000-default.conf and add the following lines to forward requests to the Node.js app:<br/>
|
2. Edit the Apache configuration file /etc/apache2/sites-enabled/000-default.conf and add the following lines to forward requests to the Node.js app:<br/>
|
||||||
|
|
||||||
|
|
||||||
```ProxyPass / http://localhost:8003/```<br/>
|
`ProxyPass / http://localhost:8003/`<br/>
|
||||||
|
|
||||||
3. If you have other sites or applications running on Apache2 that should not be proxied to Node.js, you can add exceptions like this:<br/>
|
3. If you have other sites or applications running on Apache2 that should not be proxied to Node.js, you can add exceptions like this:<br/>
|
||||||
|
|
||||||
|
|
||||||
```ProxyPass /wordpress !```<br/>
|
`ProxyPass /wordpress !`<br/>
|
||||||
|
|
||||||
Replace /wordpress with the appropriate path for your exception:<br/>
|
Replace /wordpress with the appropriate path for your exception:<br/>
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ To set up Apache2 as a reverse proxy for your Node.js app:
|
|||||||
To verify that the Node.js application is running and accessible through Apache2, you can use the curl command:
|
To verify that the Node.js application is running and accessible through Apache2, you can use the curl command:
|
||||||
|
|
||||||
|
|
||||||
```curl http://localhost:8003```
|
`curl http://localhost:8003`<br/>
|
||||||
|
|
||||||
|
|
||||||
This should return the response from your Node.js application.
|
This should return the response from your Node.js application.
|
||||||
|
Loading…
Reference in New Issue
Block a user