Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
* Fresh install with SSH attached into the droplet (Ubuntu LTS 16.04). * `ssh root@xxx:xxx:xxx:xxx`. * `adduser notalentgeek`. * `usermod -aG sudo notalentgeek`. * `su notalentgeek`. * Now I am on the newly created user `notalentgeek`. * Move into "How To Create a Self-Signed SSL Certificate for Apache in Ubuntu 16.04" tutorial. * `sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt`. * In the form I put everything as "asd" (any arbitrary thing in my mind, are these matters). Except for "Common Name (e.g. server FQDN or YOUR name) []:" is to ip of `xxx:xxx:xxx:xxx`. * `sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048` and wait for a while. * `sudo nano /etc/apache2/conf-available/ssl-params.conf`. * Copy paste the settings from the tutorial (__StackOverflow code formatting does not working here!__). # from https://cipherli.st/ # and https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH SSLProtocol All -SSLv2 -SSLv3 SSLHonorCipherOrder On # Disable preloading HSTS for now. You can use the commented out header line that includes # the "preload" directive if you understand the implications. #Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains" Header always set X-Frame-Options DENY Header always set X-Content-Type-Options nosniff # Requires Apache >= 2.4 SSLCompression off SSLSessionTickets Off SSLUseStapling on SSLStaplingCache "shmcb:logs/stapling-cache(150000)" SSLOpenSSLConfCmd DHParameters "/etc/ssl/certs/dhparam.pem" * `sudo cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf.bak` to create backup. * `sudo nano /etc/apache2/sites-available/default-ssl.conf`. <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin asd@asd.com ServerName xxx:xxx:xxx:xxx DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </VirtualHost> </IfModule> * `sudo ufw app list`, adjusting fire wall. I just put whatever codes they put there. * `sudo ufw status`. * `sudo ufw allow 'Apache Full'`. * `sudo ufw delete allow 'Apache'`. * `sudo ufw status`. * `sudo a2enmod ssl`. * `sudo a2enmod headers`. * `sudo a2ensite default-ssl`. * `sudo a2enconf ssl-params`. * `sudo apache2ctl configtest`, there is no warning appeared in my case. But, in the tutorial it may have warning. This command returns, `Syntax OK`. * Testing server as I mentioned before, `https://xxx.xxx.xxx.xxx` works, but `https://xxx.xxx.xxx.xxx:5000` does not (5000 is my port for Flask.). * `sudo nano /etc/apache2/sites-available/000-default.conf` * Add `Redirect permanent "/" "https://xxx.xxx.xxx.xxx:5000/"`. * `sudo apache2ctl configtest` results in `Syntax OK`. * `sudo systemctl restart apache2`. * This the launch from my Flask App. > WebSocket transport not available. Install eventlet or gevent and gevent-websocket for improved performance. > * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * Going to `http://xxx.xxx.xxx.xxx:5000/`, where `xxx.xxx.xxx.xxx` is the IP of DigitalOcean Droplet refer to my web app successfully. But web app needs access to webcam and microphone. * Following other tutorial, https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps. * `sudo apt-get install libapache2-mod-wsgi python-dev`. * `sudo a2enmod wsgi`. * `cd /var/www`. * `sudo mkdir FlaskApp`. * `cd FlaskApp`. * `git clone https://github.com/notalentgeek/my_app --depth 1`. * `cd my_app`. * Installing, `pip3` and `virtualenv`. Running from `http` is still fine! * `sudo nano /etc/apache2/sites-available/FlaskApp.conf` (formatting also does not working!). <VirtualHost *:80> ServerName https://xxx.xxx.xxx.xxx:5000/ ServerAdmin asd@asd.com WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi <Directory /var/www/FlaskApp/my_app/> Order allow,deny Allow from all </Directory> Alias /static /var/www/FlaskApp/my_app/static <Directory /var/www/FlaskApp/my_app/static/> Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> * `sudo a2ensite FlaskApp`. * `cd /var/www/FlaskApp`. * `sudo nano flaskapp.wsgi`. * `sudo service apache2 restart`, the tutorial says that would be a warning message. but I did not get any. * `sudo python3 -B my_app.py` results in these. > WebSocket transport not available. Install eventlet or gevent and gevent-websocket for improved performance. > * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * In `http` all work but not `https`.
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
F-Formula
2 hours ago | 1.23 KB
SEEING GOD IN THE MATH
2 hours ago | 0.12 KB
Untitled
18 hours ago | 1.88 KB
Untitled
18 hours ago | 0.67 KB
Untitled
18 hours ago | 3.33 KB
Untitled
18 hours ago | 1.00 KB
Untitled
18 hours ago | 0.33 KB
Untitled
18 hours ago | 1.55 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!