장고재설치

 

ubuntu server 18.04 LTS 에 apache2, django, mod_wsgi 설치

 

https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-16-04

 

azub1904@azub1904:~$ sudo apt-get install python3-pip apache2 libapache2-mod-wsgi-py3
[sudo] azub1904의 암호:
패키지 목록을 읽는 중입니다… 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다… 완료
패키지 libapache2-mod-wsgi-py3는 이미 최신 버전입니다 (4.6.5-1).
패키지 python3-pip는 이미 최신 버전입니다 (18.1-5).
패키지 apache2는 이미 최신 버전입니다 (2.4.38-2ubuntu2.2).
0개 업그레이드, 0개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
azub1904@azub1904:~$ sudo pip3 install virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/azub1904/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (15.1.0)
azub1904@azub1904:~$ sudo pip uninstall django
sudo: pip: 명령이 없습니다
azub1904@azub1904:~$ sudo pip3 uninstall django
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
cd Uninstalling Django-2.2.5:
Would remove:
/usr/local/bin/django-admin
/usr/local/bin/django-admin.py
/usr/local/lib/python3.7/dist-packages/Django-2.2.5.dist-info/*
/usr/local/lib/python3.7/dist-packages/django/*
Proceed (y/n)? y
Your response (‘cd y’) was not one of the expected responses: y, n
Proceed (y/n)? y
Successfully uninstalled Django-2.2.5
azub1904@azub1904:~$ pwd
/home/azub1904
azub1904@azub1904:~$ ls -al
합계 16668
drwxr-xr-x 25 azub1904 azub1904 4096 9월 8 21:11 .
drwxr-xr-x 3 root root 4096 8월 30 23:15 ..
-rw——- 1 azub1904 azub1904 7176 9월 8 21:11 .ICEauthority
drwxrwxr-x 9 azub1904 azub1904 4096 9월 7 23:56 .atom
-rw——- 1 azub1904 azub1904 6012 9월 8 20:58 .bash_history
-rw-r–r– 1 azub1904 azub1904 220 8월 30 23:15 .bash_logout
-rw-r–r– 1 azub1904 azub1904 3771 8월 30 23:15 .bashrc
drwx—— 17 azub1904 azub1904 4096 9월 6 01:26 .cache
drwx—— 20 azub1904 azub1904 4096 9월 4 01:29 .config
drwx—— 2 azub1904 azub1904 4096 9월 4 01:23 .gconf
drwx—— 3 azub1904 azub1904 4096 8월 30 23:40 .gnupg
drwx—— 3 azub1904 azub1904 4096 8월 31 08:20 .local
drwx—— 5 azub1904 azub1904 4096 8월 30 23:33 .mozilla
drwxr-xr-x 2 azub1904 azub1904 4096 9월 4 01:26 .mplayer
-rw——- 1 azub1904 azub1904 18 9월 2 22:46 .mysql_history
drwx—— 3 azub1904 azub1904 4096 8월 30 23:41 .pki
-rw-r–r– 1 azub1904 azub1904 807 8월 30 23:15 .profile
-rw——- 1 azub1904 azub1904 5 8월 31 01:17 .python_history
drwx—— 2 azub1904 azub1904 4096 9월 5 00:30 .ssh
-rw-r–r– 1 azub1904 azub1904 0 8월 31 00:04 .sudo_as_admin_successful
drwx—— 5 azub1904 azub1904 4096 9월 6 01:26 .thunderbird
drwxrwxr-x 3 azub1904 azub1904 4096 9월 1 02:54 .vscode
-rw-rw-r– 1 azub1904 azub1904 131 8월 31 08:22 .xinputrc
drwxr-xr-x 2 azub1904 azub1904 4096 9월 2 22:04 001
drwxrwxr-x 3 azub1904 azub1904 4096 9월 4 03:58 dev
-rw-r–r– 1 azub1904 azub1904 8980 8월 30 23:15 examples.desktop
drwxr-xr-x 3 azub1904 azub1904 4096 8월 30 23:52 snap
-rw-r–r– 1 root root 16908762 8월 18 11:38 webmin_1.930_all.deb
drwxr-xr-x 2 azub1904 azub1904 4096 8월 31 08:21 공개
drwxr-xr-x 4 azub1904 azub1904 4096 9월 7 23:57 다운로드
drwxr-xr-x 2 azub1904 azub1904 4096 8월 31 00:28 문서
drwxr-xr-x 2 azub1904 azub1904 4096 8월 31 08:21 바탕화면
drwxr-xr-x 2 azub1904 azub1904 4096 8월 31 08:21 비디오
drwxr-xr-x 3 azub1904 azub1904 4096 9월 4 01:23 사진
drwxr-xr-x 3 azub1904 azub1904 4096 8월 31 00:29 음악
drwxr-xr-x 2 azub1904 azub1904 4096 8월 31 08:21 템플릿
azub1904@azub1904:~$ sudo pip3 install virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/azub1904/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (15.1.0)
azub1904@azub1904:~$ sudo pip3 uninstall virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Not uninstalling virtualenv at /usr/lib/python3/dist-packages, outside environment /usr
Can’t uninstall ‘virtualenv’. No files were found to uninstall.
azub1904@azub1904:~$ sudo pip uninstall virtualenv
sudo: pip: 명령이 없습니다
azub1904@azub1904:~$ cd /var/www/html/djangodev
azub1904@azub1904:/var/www/html/djangodev$ sudo pip3 uninstall virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Not uninstalling virtualenv at /usr/lib/python3/dist-packages, outside environment /usr
Can’t uninstall ‘virtualenv’. No files were found to uninstall.
azub1904@azub1904:/var/www/html/djangodev$ cd mytestsite/
azub1904@azub1904:/var/www/html/djangodev/mytestsite$ sudo pip3 uninstall virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Not uninstalling virtualenv at /usr/lib/python3/dist-packages, outside environment /usr
Can’t uninstall ‘virtualenv’. No files were found to uninstall.
azub1904@azub1904:/var/www/html/djangodev/mytestsite$ cd mytestsite/
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ sudo pip3 uninstall virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Not uninstalling virtualenv at /usr/lib/python3/dist-packages, outside environment /usr
Can’t uninstall ‘virtualenv’. No files were found to uninstall.
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ whereis virtualenv
virtualenv:
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ /dev/
bash: /dev/: 디렉터리입니다
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ sudo apt unistall pipenv
E: 잘못된 작업 unistall
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ sudo apt uninstall pipenv
E: 잘못된 작업 uninstall
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ man apt
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ sudo apt autoremove pipenv
패키지 목록을 읽는 중입니다… 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다… 완료
다음 패키지를 지울 것입니다:
pipenv python3-virtualenv python3-virtualenv-clone
0개 업그레이드, 0개 새로 설치, 3개 제거 및 0개 업그레이드 안 함.
이 작업 후 13.0 M바이트의 디스크 공간이 비워집니다.
계속 하시겠습니까? [Y/n] y
(데이터베이스 읽는중 …현재 233520개의 파일과 디렉터리가 설치되어 있습니다.)
Removing pipenv (11.9.0-1) …
Removing python3-virtualenv (15.1.0+ds-2) …
Removing python3-virtualenv-clone (0.3.0-1.2) …
Processing triggers for man-db (2.8.5-2) …
azub1904@azub1904:/var/www/html/djangodev/mytestsite/mytestsite$ cd
azub1904@azub1904:~$ cd home/azub1904
bash: cd: home/azub1904: 그런 파일이나 디렉터리가 없습니다
azub1904@azub1904:~$ ls
001 examples.desktop webmin_1.930_all.deb 다운로드 바탕화면 사진 템플릿
dev snap 공개 문서 비디오 음악
azub1904@azub1904:~$ sudo pip3 install virtualenv
The directory ‘/home/azub1904/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/azub1904/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting virtualenv
Downloading https://files.pythonhosted.org/packages/8b/12/8d4f45b8962b03ac9efefe5ed5053f6b29334d83e438b4fe379d21c0cb8e/virtualenv-16.7.5-py2.py3-none-any.whl (3.3MB)
100% |████████████████████████████████| 3.3MB 239kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-16.7.5
azub1904@azub1904:~$ mkdir djangodev
azub1904@azub1904:~$ cd djangodev/
azub1904@azub1904:~/djangodev$ virtualenv djenv
Using base prefix ‘/usr’
New python executable in /home/azub1904/djangodev/djenv/bin/python3
Also creating executable in /home/azub1904/djangodev/djenv/bin/python
Installing setuptools, pip, wheel…
done.
azub1904@azub1904:~/djangodev$ source djenv/bin/activate
(djenv) azub1904@azub1904:~/djangodev$
(djenv) azub1904@azub1904:~/djangodev$
(djenv) azub1904@azub1904:~/djangodev$ pip3 install django
Collecting django
Downloading https://files.pythonhosted.org/packages/94/9f/a56f7893b1280e5019482260e246ab944d54a9a633a01ed04683d9ce5078/Django-2.2.5-py3-none-any.whl (7.5MB)
|████████████████████████████████| 7.5MB 990kB/s
Collecting pytz (from django)
Downloading https://files.pythonhosted.org/packages/87/76/46d697698a143e05f77bec5a526bf4e56a0be61d63425b68f4ba553b51f2/pytz-2019.2-py2.py3-none-any.whl (508kB)
|████████████████████████████████| 512kB 9.5MB/s
Collecting sqlparse (from django)
Downloading https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Installing collected packages: pytz, sqlparse, django
Successfully installed django-2.2.5 pytz-2019.2 sqlparse-0.3.0
(djenv) azub1904@azub1904:~/djangodev$ ls
djenv
(djenv) azub1904@azub1904:~/djangodev$ ls -al
합계 12
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 21:40 .
drwxr-xr-x 26 azub1904 azub1904 4096 9월 8 21:38 ..
drwxr-xr-x 5 azub1904 azub1904 4096 9월 8 21:40 djenv
(djenv) azub1904@azub1904:~/djangodev$ django-admin.py startproject djenv
CommandError: ‘/home/azub1904/djangodev/djenv’ already exists
(djenv) azub1904@azub1904:~/djangodev$ django-admin.py startproject dj
(djenv) azub1904@azub1904:~/djangodev$ ls -al
합계 16
drwxr-xr-x 4 azub1904 azub1904 4096 9월 8 21:47 .
drwxr-xr-x 26 azub1904 azub1904 4096 9월 8 21:38 ..
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 21:47 dj
drwxr-xr-x 5 azub1904 azub1904 4096 9월 8 21:40 djenv
(djenv) azub1904@azub1904:~/djangodev$ cd dj
(djenv) azub1904@azub1904:~/djangodev/dj$ ls -al
합계 16
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 21:47 .
drwxr-xr-x 4 azub1904 azub1904 4096 9월 8 21:47 ..
drwxr-xr-x 2 azub1904 azub1904 4096 9월 8 21:47 dj
-rwxr-xr-x 1 azub1904 azub1904 622 9월 8 21:47 manage.py
(djenv) azub1904@azub1904:~/djangodev/dj$ cd dj
(djenv) azub1904@azub1904:~/djangodev/dj/dj$ ls -al
합계 20
drwxr-xr-x 2 azub1904 azub1904 4096 9월 8 21:47 .
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 21:47 ..
-rw-r–r– 1 azub1904 azub1904 0 9월 8 21:47 __init__.py
-rw-r–r– 1 azub1904 azub1904 3076 9월 8 21:47 settings.py
-rw-r–r– 1 azub1904 azub1904 744 9월 8 21:47 urls.py
-rw-r–r– 1 azub1904 azub1904 381 9월 8 21:47 wsgi.py
(djenv) azub1904@azub1904:~/djangodev/dj/dj$ nano settings.py
(djenv) azub1904@azub1904:~/djangodev/dj/dj$ vim settings.py

Command ‘vim’ not found, but can be installed with:

sudo apt install vim # version 2:8.1.0320-1ubuntu3, or
sudo apt install vim-gtk3 # version 2:8.1.0320-1ubuntu3
sudo apt install vim-tiny # version 2:8.1.0320-1ubuntu3
sudo apt install neovim # version 0.3.4-1
sudo apt install vim-athena # version 2:8.1.0320-1ubuntu3
sudo apt install vim-gtk # version 2:8.1.0320-1ubuntu3
sudo apt install vim-nox # version 2:8.1.0320-1ubuntu3

(djenv) azub1904@azub1904:~/djangodev/dj/dj$ cd ..
(djenv) azub1904@azub1904:~/djangodev/dj$ cd dj
(djenv) azub1904@azub1904:~/djangodev/dj/dj$ ./manage.py makemigrations
bash: ./manage.py: 그런 파일이나 디렉터리가 없습니다
(djenv) azub1904@azub1904:~/djangodev/dj/dj$ cd ..
(djenv) azub1904@azub1904:~/djangodev/dj$ ./manage.py makemigrations
No changes detected
(djenv) azub1904@azub1904:~/djangodev/dj$ ./manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial… OK
Applying auth.0001_initial… OK
Applying admin.0001_initial… OK
Applying admin.0002_logentry_remove_auto_add… OK
Applying admin.0003_logentry_add_action_flag_choices… OK
Applying contenttypes.0002_remove_content_type_name… OK
Applying auth.0002_alter_permission_name_max_length… OK
Applying auth.0003_alter_user_email_max_length… OK
Applying auth.0004_alter_user_username_opts… OK
Applying auth.0005_alter_user_last_login_null… OK
Applying auth.0006_require_contenttypes_0002… OK
Applying auth.0007_alter_validators_add_error_messages… OK
Applying auth.0008_alter_user_username_max_length… OK
Applying auth.0009_alter_user_last_name_max_length… OK
Applying auth.0010_alter_group_name_max_length… OK
Applying auth.0011_update_proxy_permissions… OK
Applying sessions.0001_initial… OK
(djenv) azub1904@azub1904:~/djangodev/dj$ ./manage.py createsuperuser
Username (leave blank to use ‘azub1904’):
Email address:
Password:
Password (again):
Superuser created successfully.
(djenv) azub1904@azub1904:~/djangodev/dj$ ./manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings.

This will overwrite existing files!
Are you sure you want to do this?

Type ‘yes’ to continue, or ‘no’ to cancel: yes
Traceback (most recent call last):
File “./manage.py”, line 21, in <module>
main()
File “./manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/core/management/__init__.py”, line 381, in execute_from_command_line
utility.execute()
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/core/management/__init__.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/core/management/base.py”, line 323, in run_from_argv
self.execute(*args, **cmd_options)
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/core/management/base.py”, line 364, in execute
output = self.handle(*args, **options)
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py”, line 188, in handle
collected = self.collect()
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py”, line 114, in collect
handler(path, prefixed_path, storage)
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py”, line 342, in copy_file
if not self.delete_file(path, prefixed_path, source_storage):
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py”, line 249, in delete_file
if self.storage.exists(prefixed_path):
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/core/files/storage.py”, line 310, in exists
return os.path.exists(self.path(name))
File “/home/azub1904/djangodev/djenv/lib/python3.7/site-packages/django/contrib/staticfiles/storage.py”, line 44, in path
raise ImproperlyConfigured(“You’re using the staticfiles app ”
django.core.exceptions.ImproperlyConfigured: You’re using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
(djenv) azub1904@azub1904:~/djangodev/dj$ sudo ufw allow 8000
[sudo] azub1904의 암호:
규칙이 업데이트됐습니다
규칙이 업데이트됐습니다(v6)
(djenv) azub1904@azub1904:~/djangodev/dj$ ./manage.py runserver 0.0.0.0:8000
Watching for file changes with StatReloader
Performing system checks…

System check identified no issues (0 silenced).
September 08, 2019 – 13:09:26
Django version 2.2.5, using settings ‘dj.settings’
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.
(djenv) azub1904@azub1904:~/djangodev/dj$ ./manage.py runserver 0.0.0.0:7000
Watching for file changes with StatReloader
Performing system checks…

System check identified no issues (0 silenced).
September 08, 2019 – 13:09:43
Django version 2.2.5, using settings ‘dj.settings’
Starting development server at http://0.0.0.0:7000/
Quit the server with CONTROL-C.
Invalid HTTP_HOST header: ‘0.0.0.0:7000’. You may need to add ‘0.0.0.0’ to ALLOWED_HOSTS.
Bad Request: /
[08/Sep/2019 13:10:02] “GET / HTTP/1.1” 400 65800
Invalid HTTP_HOST header: ‘0.0.0.0:7000’. You may need to add ‘0.0.0.0’ to ALLOWED_HOSTS.
Bad Request: /favicon.ico
[08/Sep/2019 13:10:04] “GET /favicon.ico HTTP/1.1” 400 65843
deactivate

^Z
[1]+ 정지됨 ./manage.py runserver 0.0.0.0:7000
(djenv) azub1904@azub1904:~/djangodev/dj$ ls -l
합계 136
-rw-r–r– 1 azub1904 azub1904 131072 9월 8 22:05 db.sqlite3
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 22:03 dj
-rwxr-xr-x 1 azub1904 azub1904 622 9월 8 21:47 manage.py
(djenv) azub1904@azub1904:~/djangodev/dj$ chmod 664 db.sqlite3
(djenv) azub1904@azub1904:~/djangodev/dj$ ls -al
합계 144
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 22:05 .
drwxr-xr-x 4 azub1904 azub1904 4096 9월 8 21:47 ..
-rw-rw-r– 1 azub1904 azub1904 131072 9월 8 22:05 db.sqlite3
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 22:03 dj
-rwxr-xr-x 1 azub1904 azub1904 622 9월 8 21:47 manage.py
(djenv) azub1904@azub1904:~/djangodev/dj$ sudo chown :www-data db.sqlite3
[sudo] azub1904의 암호:
(djenv) azub1904@azub1904:~/djangodev/dj$ ls -al
합계 144
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 22:05 .
drwxr-xr-x 4 azub1904 azub1904 4096 9월 8 21:47 ..
-rw-rw-r– 1 azub1904 www-data 131072 9월 8 22:05 db.sqlite3
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 22:03 dj
-rwxr-xr-x 1 azub1904 azub1904 622 9월 8 21:47 manage.py
(djenv) azub1904@azub1904:~/djangodev/dj$ cd ..
(djenv) azub1904@azub1904:~/djangodev$ ls -al
합계 16
drwxr-xr-x 4 azub1904 azub1904 4096 9월 8 21:47 .
drwxr-xr-x 26 azub1904 azub1904 4096 9월 8 21:38 ..
drwxr-xr-x 3 azub1904 azub1904 4096 9월 8 22:05 dj
drwxr-xr-x 5 azub1904 azub1904 4096 9월 8 21:40 djenv
(djenv) azub1904@azub1904:~/djangodev$ sudo chown :www-data dj
(djenv) azub1904@azub1904:~/djangodev$ ls -al
합계 16
drwxr-xr-x 4 azub1904 azub1904 4096 9월 8 21:47 .
drwxr-xr-x 26 azub1904 azub1904 4096 9월 8 21:38 ..
drwxr-xr-x 3 azub1904 www-data 4096 9월 8 22:05 dj
drwxr-xr-x 5 azub1904 azub1904 4096 9월 8 21:40 djenv
(djenv) azub1904@azub1904:~/djangodev$ sudo ufw allow ‘Apache Full’
존재하는 규칙을 추가하는 걸 건너뜁니다
존재하는 규칙을 추가하는 걸 건너뜁니다 (v6)
(djenv) azub1904@azub1904:~/djangodev$ sudo apache2ctl configtest
AH00526: Syntax error on line 41 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command ‘SGIDaemonProcess’, perhaps misspelled or defined by a module not included in the server configuration
Action ‘configtest’ failed.
The Apache error log may have more information.
(djenv) azub1904@azub1904:~/djangodev$ sudo apache2ctl configtest
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
Syntax OK
(djenv) azub1904@azub1904:~/djangodev$ sudo systemctl restart apache
Failed to restart apache.service: Unit apache.service not found.
(djenv) azub1904@azub1904:~/djangodev$ sudo systemctl restart apache2
(djenv) azub1904@azub1904:~/djangodev$

 

 

 

 

댓글 남기기