私はApacheサーバーでdjangoプロジェクトを設定しています。私は.htaccessファイルとindex.fcgiファイルにアクセスできますが、sudoアクセスはありません。 urls.pyまたはsettings.pyに変更を加えると、変更が反映されません。 Apacheを再起動せずに変更が反映される方法はありますか?たとえば、.htaccessファイルに設定を追加するなどします。ここでhttps://stackoverflow.com/a/6282363/5881884Django Apacheの再起動なしでurls.pyとsettings.pyの変更を表示する方法
は.wsgiファイルにタッチをやってお勧めしますが、私は.wsgiで終わるすべてのファイルを持っているドントとどちらの文字列を含むファイルが存在しているdjango.core.handlers.wsgi.WSGIHandler()
.htaccessファイル:
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule /static/ /home/myusername/public_html/static
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^(.*)$ index.fcgi/$1 [L]
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]