digital-ocean

Laravel routes not found on nginx

▼魔方 西西 提交于 2019-12-24 03:33:32
问题 when I try to access my test app, just the index route works: malte.italoborg.es If I try to access another route, like: malte.italoborg.es/admin I got 404 error. My nginx app file: server { listen 80; server_name malte.italoborg.es; root /home/italo/www/malte.italoborg.es/public; charset utf-8; location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } access_log off; error_log /home/log/nginx/malte.italoborg.es-error.log

simple Program to access digitalocean droplet information in java

假装没事ソ 提交于 2019-12-24 02:23:49
问题 I am new to DigitalOcean.I would like to run basic java program to access DigitalOcean droplet. please let me know step by step procedure. 回答1: You can get information about your droplets using their official API. It is a simple REST api which you can call using Java's URL class. More about howto make HTTP GET using Java: Using java.net.URLConnection to fire and handle HTTP requests For simple retrieval of information about your account, Droplets etc. you should use the GET method. The

Laravel Forge + DigitalOcean - Adding a SFTP user with restricted access only to a directory

▼魔方 西西 提交于 2019-12-23 15:23:18
问题 I am using Laravel Forge in a DigitalOcean droplet. I need to grant SFTP access to a specific directory on the server to one of my clients. He needs read/write access to only that directory, and I am having problems with the setup. I have followed the steps in https://bensmann.no/restrict-sftp-users-to-home-folder/, but I am stuck because Forge does not permit password authentication, only through public/private SSH keys... Has someone done something similar? What would be the best approach

Create react app + Gitlab CI + Digital Ocean droplet - Pipeline succeeds but Docker container is deleted right after

帅比萌擦擦* 提交于 2019-12-23 05:09:42
问题 I'm having my first steps into Docker/CI/CD. For that, I'm trying to deploy a raw create-react-app to my Digital Ocean droplet (Docker One-Click Application) using Gitlab CI. Those are my files: Dockerfile.yml # STAGE 1 - Building assets FROM node:alpine as building_assets_stage WORKDIR /workspace ## Preparing the image (installing dependencies and building static files) COPY ./package.json . RUN yarn install COPY . . RUN yarn build # STAGE 2 - Serving static content FROM nginx as serving

No 'Access-Control-Allow-Origin' header is present on the requested resource with Django digitalocean Spaces

隐身守侯 提交于 2019-12-22 13:57:07
问题 My Django website is hosting in digitalocean ubuntu 16.04 with Nginx. I have setup digitalocean CORS Configurations as here https://www.digitalocean.com/docs/spaces/how-to/cors/ I added my domian name in the 'origin',checked all the options in 'Allowed Methods',the only thing I haven't done is add headers in 'Alowed Headers' because I have no idea what to add. When I use digitalocean Spaces(a service based on and very similar as Amazon S3) as my static and media file storage.There is No

Flask website — 500 Internal Server Error

情到浓时终转凉″ 提交于 2019-12-22 12:49:08
问题 I cannot for the life of me figure of why this flask application I'm trying to launch is not working. I am running it on a $5 Digital Ocean droplet. Here's (hopefully) everything you need to know about it: Directory layout (contained within /var/www/ ): FlaskApp FlaskApp __init__.py static templates venv flaskapp.wsgi __init__.py : from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "yay it worked" if __name__ == "__main__": app.run() flaskapp.wsgi : #!/usr/bin

Unable to connect to mysql on digitalocean using workbench over ssh

你说的曾经没有我的故事 提交于 2019-12-22 11:37:40
问题 I have got my droplet set with the laravel app and database. Created my db while on putty ssh. Now when I am trying to connect to my mysql database as in image, i am getting error. Error: Authentication error, unhandled exception caught in tunnel manager, plese refer to logs for details. Note that my credentials are right, as that what I use to connect through putty. Any help on how can I see view my database? 回答1: Got this solved like this. Turns out this is an ssh level issue. The digital

How do I include nginx and gunicorn configuration files in source control on Digital Ocean?

时间秒杀一切 提交于 2019-12-22 11:16:43
问题 I'm running gunicorn and nginx on a Digital Ocean droplet. The issue I'm facing is that my config files for these services are at /etc/nginx/sites-enabled/django and /etc/init/gunicorn.conf while my code is at /src/my_project My issue is, my source code is under source control. The config files within /etc/ aren't. This question, How do you deal with configuration files in source control?, says you should keep your config files in source control, but it doesn't explain how to configure them.

Error 502 Bad Gateway on NGINX + rails + dokku

痞子三分冷 提交于 2019-12-22 10:53:03
问题 I am receiving an Error 502 after deploying my Ruby on Rails app to a Dokku droplet on Digital Ocean. The app builds and deploys to Heroku just fine, as well as locally. Checking the NGINX logs, I see the following: 2014/01/10 01:56:32 [error] 2376#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <my.ip.add.ress>, server: app.campbellscoop.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:49153/", host: "app.campbellscoop.com" What could be

Nginx with Let's encrypt “Welcome to Nginx” instead of rails app

时间秒杀一切 提交于 2019-12-22 04:39:11
问题 I have recently deployed my Ruby on Rails application to a plain Ubuntu 16.04 DigitalOcean droplet with Nginx, passenger & Let's encrypt. The rails app worked fine with just passenger and Nginx but after I installed Let's Encrypt, it points to the "Welcome to Nginx" page instead of my rails app. I am able to make changes to see the "Welcome to Nginx!" page and see the results in the browser. When I change the root location in my sites-enabled configs to my application path instead of /html I