gpt4 book ai didi

docker - docker 中的语义媒体Wiki

转载 作者:行者123 更新时间:2023-12-02 20:11:49 25 4
gpt4 key购买 nike

我正在尝试使SMW在Docker容器中运行。我得到了
主页,但不会让我登录。它说:

登录错误
知识库使用cookie来登录用户。您已禁用Cookie。
请启用它们,然后重试。

我的浏览器确实启用了cookie。

这里的任何人都在Docker中运行SMW和/或对如何解决此问题有任何了解吗?

Dockerfile:

FROM centos:centos7
ENV HOME /opt/smw

ADD . $HOME
RUN chmod 777 $HOME

# Add the ngix and PHP dependent repository
ADD nginx.repo /etc/yum.repos.d/nginx.repo

# Installing packages
RUN yum -y install nginx

# Installing PHP
RUN yum -y --enablerepo=remi,remi-php56 install nginx php-fpm php-common php-mysql php-xml

# Installing MySQL
RUN yum -y install wget && \
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm && \
rpm -ivh mysql-community-release-el7-5.noarch.rpm && \
yum -y update && \
yum -y install mysql-server

# Installing supervisor
RUN yum install -y python-setuptools
RUN easy_install pip
RUN pip install supervisor

# Adding the configuration file of the nginx
ADD nginx.conf /etc/nginx/nginx.conf
ADD default.conf /etc/nginx/conf.d/default.conf

# Adding the configuration file of the Supervisor
ADD supervisord.conf /etc/

# Config MySQL
RUN chmod 755 $HOME/config_mysql.sh
RUN $HOME/config_mysql.sh

VOLUME ["/opt/smw"]
VOLUME ["/var/lib/mysql"]
EXPOSE 80

CMD ["/opt/smw/run.sh"]

administratord.conf:
[supervisord]
;logfile=/var/log/supervisor/supervisord-nobody.log ; (main log file;default $CWD/supervisord.log)
;logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
;logfile_backups=10 ; (num of main logfile rotation backups;default 10)
;loglevel=info ; (log level;default info; others: debug,warn,trace)
;pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
;user=nobody

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[program:php5-fpm]
command=/usr/sbin/php-fpm -c /etc/php-fpm.d
numprocs=1
autostart=true
autorestart=true

[program:php5-fpm-log]
command=tail -f /var/log/php5-fpm.log
stdout_events_enabled=true
stderr_events_enabled=true

[program:nginx]
command=/usr/sbin/nginx
numprocs=1
autostart=true
autorestart=true

Nginx的配置:
server {
listen 80;

root /opt/smw;
index index.html index.htm index.php;

# Make site accessible from http://set-ip-address.xip.io
server_name localhost;

access_log /var/log/nginx/localhost.com-access.log;
error_log /var/log/nginx/localhost.com-error.log error;

charset utf-8;

location / {
try_files $uri $uri/ /index.html /index.php?$query_string;
}

location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { access_log off; log_not_found off; }

error_page 404 /index.php;

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

# Deny .htaccess file access
location ~ /\.ht {
deny all;
}

最佳答案

而不是安装remi-php56,我只安装了简单的php,然后没有问题。

关于docker - docker 中的语义媒体Wiki,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46270478/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com