custom llm always run on port 8000, how to change ...
# support
t
I have deplyoed my code in production but i dont want it to be on port 8000. I am using Nginx.
v
@the_race_east It's great to hear that you've deployed your code to production! If you want to change the port that your application is running on when using Nginx, you'll need to modify the Nginx configuration file for your site. Here's a general outline of the steps you would follow: 1. Open the Nginx configuration file for your site. This is typically located in
/etc/nginx/sites-available/
or
/etc/nginx/conf.d/
and is usually named after your domain or application. 2. Look for the
server
block in the configuration file. Inside this block, you'll find a
listen
directive that specifies the port number. It might look something like this:
Copy code
server {
       listen 8000;
       server_name example.com;
       ...
   }
3. Change the port number from
8000
to the port you wish to use. For example, if you want to use port
8080
, you would update it to:
Copy code
server {
       listen 8080;
       server_name example.com;
       ...
   }
4. Save the changes to the configuration file. 5. Test the Nginx configuration for syntax errors by running
sudo nginx -t
. 6. If the configuration test is successful, reload Nginx to apply the changes with
sudo systemctl reload nginx
or
sudo nginx -s reload
. Remember to update any firewall rules or security group settings to allow traffic on the new port if necessary. If you need further assistance with the configuration or have any other questions, feel free to ask!
You can continue this conversation by mentioning me in the message.
t
in github under app, in main.py file... i have added ( if __"name"=="__main__": unvicorn.run(app, port=5008) "
v
Got it. Tagging @User for additional help.
t
@Shubham Bajaj can you please help me with this?
s
@the_race_east the port number is usually deciced by the code if passed else by the environment. can you share the github repo.
t
its the same advance custom llm
s
yeah
you can change port over there
2 Views