I have been trying to figure this out all weekend now... I have given up on googling. I have found similar issues but none of the solutions I find have resolved the issue. I'm very new to media goblin, and haven't really dived into linux this deep before, so I am very noobish.
I have followed the instructions from http://mediagoblin.readthedocs.io/en/stable/siteadmin/deploying.html keeping all the defaults, just to get the default setup to work. I figured from there I would be able to start changing things and see what happens. Okay enough of the intro.
When I input
nginx -t
I get
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
When I input
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
I get
Using paster config: paste_local.ini
Using ./bin/paster
+ export CELERY_ALWAYS_EAGER=true
+ ./bin/paster serve paste_local.ini --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 --reload
Starting subprocess with file monitor
2017-05-22 08:39:22,377 INFO [mediagoblin.app] GNU MediaGoblin 0.9.0 main server starting
2017-05-22 08:39:22,647 INFO [mediagoblin.app] Setting up plugins.
2017-05-22 08:39:22,648 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.geolocation
2017-05-22 08:39:22,648 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.basic_auth
2017-05-22 08:39:22,648 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.processing_info
2017-05-22 08:39:22,648 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.image
2017-05-22 08:39:22,797 INFO [mediagoblin.init.celery] Setting celery configuration from object "mediagoblin.init.celery.dummy_settings_module"
Starting server in PID 990.
It doesn't appear as though the server is being served. When I go to the server ip i get the default nginx page.
my /etc/nginx/nginx.conf file is as follows
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
My /etc/nginx/sites-enabled/nginx.conf is as follows
server {
#################################################
# Stock useful config options, but ignore them :)
#################################################
include /etc/nginx/mime.types;
autoindex off;
default_type application/octet-stream;
sendfile on;
# Gzip
gzip on;
gzip_min_length 1024;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/javascript text/xml text/css;
#####################################
# Mounting MediaGoblin stuff
# This is the section you should read
#####################################
# Change this to update the upload size limit for your users
client_max_body_size 8m;
# prevent attacks (someone uploading a .txt file that the browser
# interprets as an HTML file, etc.)
add_header X-Content-Type-Options nosniff;
server_name mediagoblin.example.org www.mediagoblin.example.org;
access_log /var/log/nginx/mediagoblin.example.access.log;
error_log /var/log/nginx/mediagoblin.example.error.log;
# MediaGoblin's stock static files: CSS, JS, etc.
location /mgoblin_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/;
}
# Instance specific media:
location /mgoblin_media/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/;
}
# Theme static files (usually symlinked in)
location /theme_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/theme_static/;
}
# Plugin static files (usually symlinked in)
location /plugin_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/plugin_static/;
}
# Mounting MediaGoblin itself via FastCGI.
location / {
fastcgi_pass 127.0.0.1:26543;
include /etc/nginx/fastcgi_params;
# our understanding vs nginx's handling of script_name vs
# path_info don't match :)
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_NAME "";
}
}
Any advice would be greatly appreciated.
Edit 1
Response from running
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
is still
Using paster config: paste_local.ini
Using ./bin/paster
+ export CELERY_ALWAYS_EAGER=true
+ ./bin/paster serve paste_local.ini --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 --reload
Starting subprocess with file monitor
2017-05-22 12:06:37,345 INFO [mediagoblin.app] GNU MediaGoblin 0.9.0 main server starting
2017-05-22 12:06:37,583 INFO [mediagoblin.app] Setting up plugins.
2017-05-22 12:06:37,584 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.geolocation
2017-05-22 12:06:37,584 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.basic_auth
2017-05-22 12:06:37,584 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.processing_info
2017-05-22 12:06:37,585 INFO [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.image
2017-05-22 12:06:37,714 INFO [mediagoblin.init.celery] Setting celery configuration from object "mediagoblin.init.celery.dummy_settings_module"
Starting server in PID 976.
current mediagoblin nginx.conf:
server {
#################################################
# Stock useful config options, but ignore them :)
#################################################
include /etc/nginx/mime.types;
autoindex off;
default_type application/octet-stream;
sendfile on;
# Gzip
gzip on;
gzip_min_length 1024;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/javascript text/xml text/css;
listen 80;
server_name 10.1.1.74;
#####################################
# Mounting MediaGoblin stuff
# This is the section you should read
#####################################
# Change this to update the upload size limit for your users
client_max_body_size 8m;
# prevent attacks (someone uploading a .txt file that the browser
# interprets as an HTML file, etc.)
add_header X-Content-Type-Options nosniff;
server_name mediagoblin.example.org www.mediagoblin.example.org;
access_log /var/log/nginx/mediagoblin.example.access.log;
error_log /var/log/nginx/mediagoblin.example.error.log;
# MediaGoblin's stock static files: CSS, JS, etc.
location /mgoblin_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/;
}
# Instance specific media:
location /mgoblin_media/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/;
}
# Theme static files (usually symlinked in)
location /theme_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/theme_static/;
}
# Plugin static files (usually symlinked in)
location /plugin_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/plugin_static/;
}
# Mounting MediaGoblin itself via FastCGI.
location / {
fastcgi_pass 127.0.0.1:26543;
include /etc/nginx/fastcgi_params;
# our understanding vs nginx's handling of script_name vs
# path_info don't match :)
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_NAME "";
}
}
current /etc/nginx/nginx.conf:
Edit 2 Current nginx.conf file for server (both defaults are working)
server {
#################################################
# Stock useful config options, but ignore them :)
#################################################
include /etc/nginx/mime.types;
autoindex off;
default_type application/octet-stream;
sendfile on;
# Gzip
gzip on;
gzip_min_length 1024;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/javascript text/xml text/css;
listen 80;
server_name 10.0.0.192;
#####################################
# Mounting MediaGoblin stuff
# This is the section you should read
#####################################
# Change this to update the upload size limit for your users
client_max_body_size 8m;
# prevent attacks (someone uploading a .txt file that the browser
# interprets as an HTML file, etc.)
add_header X-Content-Type-Options nosniff;
server_name mediagoblin.example.org www.mediagoblin.example.org;
access_log /var/log/nginx/mediagoblin.example.access.log;
error_log /var/log/nginx/mediagoblin.example.error.log;
# MediaGoblin's stock static files: CSS, JS, etc.
location /mgoblin_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/mediagoblin/static/;
}
# Instance specific media:
location /mgoblin_media/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/media/public/;
}
# Theme static files (usually symlinked in)
location /theme_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/theme_static/;
}
# Plugin static files (usually symlinked in)
location /plugin_static/ {
alias /srv/mediagoblin.example.org/mediagoblin/user_dev/plugin_static/;
}
# Mounting MediaGoblin itself via FastCGI.
location / {
fastcgi_pass 10.0.0.192:26543;
include /etc/nginx/fastcgi_params;
# our understanding vs nginx's handling of script_name vs
# path_info don't match :)
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_NAME "";
}
}
When I run this command, as suggested by the guide, I am unable to load the page.
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
However when I run this command, it works.
./lazyserver.sh --server-name=fcgi fcgi_host=10.0.0.192 fcgi_port=26543
I'm not sure if the first one, as supplemented by the guide, implied that you were accessing it locally... which would make sense since the dns url created in the directions was supposed to work without implicitly creating a dns entry anywhere... orrr if i'm still doing something wrong.
You probably have a default server in /etc/nginx/sites-enabled/
. If you use mediagoblin.example.org
to access the server, then your server configuration will match.
You state that you use the server's IP address, which means that the default server will be used instead.
You have a number of options:
server_name
directive and pretend that that is a valid name for your server.See this document for more.