retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.63k stars 362 forks source link

Can't make it work #15

Open romu70 opened 9 years ago

romu70 commented 9 years ago

Hi, I've installed WebVirtCloud to make some testing. Setup ran fine as much as I can say. If I browse http://localhost, I see the nginx welcome page. But I've tried ports 8000 (like webvirtmgr) and 6080 (taken from the settings.py), none work.

Is webvirtcloud autonomous? Or Do I have to install it with webvirtmgr?

retspen commented 9 years ago

Show your nginx settings for webvirtcloud virtual host

romu70 commented 9 years ago

Which file ? FYI, in the /etc/nginx/sites-enabled/default, there is no virtual host at all, just the default nginx configuration on port 80.

retspen commented 9 years ago

https://github.com/retspen/webvirtcloud#install-webvirtcloud-panel

romu70 commented 9 years ago

Yes, this is what I ran yesterday when I installed it. I'll erase my current setup and re-run from scratch. Let you know.

retspen commented 9 years ago

In file webvirtmgr.conf for nginx you have parameter "server_name webvirtcloud.example.com;” you need change it

On Fri, Jun 5, 2015 at 10:35 AM, romu70 notifications@github.com wrote:

Yes, this is what I ran yesterday when I installed it. I'll era my current setup and re-run from scratch. Let you know.

— Reply to this email directly or view it on GitHub https://github.com/retspen/webvirtcloud/issues/15#issuecomment-109191355 .

romu70 commented 9 years ago

So, I re-ran the setup. The /etc/nginx/conf.d/webvirtcloud.conf file is:

server {
    listen 80;

    server_name webvirtcloud.example.com;
    #access_log /var/log/nginx/webvirtcloud-access_log; 

    location /static/ {
        root /var/www/webvirtcloud;
        expires max;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-Proto $remote_addr;
        proxy_connect_timeout 600;
        proxy_read_timeout 600;
        proxy_send_timeout 600;
        client_max_body_size 1024M;
    }
}

And still doesn't work.

retspen commented 9 years ago

Change parameter "server_name webvirtcloud.example.com;" - this is virtual host name

romu70 commented 9 years ago

Changed to my machine name and restarted both nginx and supervisord. Browsing http://#server_name value# leads to the nginx default page. http://#server_name value#:8000 leads to "Unable to connect".

retspen commented 9 years ago

http://your_server_name/ - without 8000

romu70 commented 9 years ago

Just the "Welcome to nginx" page.

retspen commented 9 years ago

What show?

$ ping your_server_name
romu70 commented 9 years ago

127.0.1.1 because I'm connected localy to this server.

retspen commented 9 years ago

Ok, change server_name xxxx; to server_name localhost; and restart nginx service. If you would have problem you need check default config for nginx where define sever_name localhost.

romu70 commented 9 years ago

Does not change anything, still see the nginx default page.

retspen commented 9 years ago

Do you connect to http://localhost ? Remove default nginx settings.

romu70 commented 9 years ago

Yes of course. I'll test with webvirtmgr to see if it's better.

retspen commented 9 years ago

Can you setup nginx like in webvirtmgr, settings for nginx the same

romu70 commented 9 years ago

Ok, removed all files within /var/www, and ran again the installation process, and it works! Don't know where the problem was. Just an issue, it seems to not process the CSS, there is no style on the page.

retspen commented 9 years ago

Check /static/ path in config must be root /var/www/webvirtcloud;

romu70 commented 9 years ago

Path seems right in the HTML, but the Firefox inspector says: "No CSS Prpperties found".

I've also tried to change "webvirtcloud.example.com" to my machine name in the /etc/nginx/conf.d/webvirtcloud.conf file, but then, I get the "Unable to connect" page again. Only localhost gives me something, but without CSS.

retspen commented 9 years ago

Show your nginx error log

thatnerdjosh commented 9 years ago

This has been fixed in the latest merges :)

aa1121 commented 4 years ago

I'm having a similar issue. I can only connect through localhost using port forwarding and css doesnt load. connecting to the remote ip address gives me nothing. How can i fix this?, how can i either get the css to load or connect directly through the ip address?

catborise commented 4 years ago

hi @aa1121 could you please create a vm on the host. then install webvirtcloud on it. this isolates many unknown environment effects

aa1121 commented 4 years ago

i already have vms on the host, reinstalled webvirtcloud but i'm getting the same issue

catborise commented 4 years ago

@aa1121 install webvirtcloud on a vm not to host

aa1121 commented 4 years ago

did that, same thing, no css...

catborise commented 4 years ago

whic os do you use for webvirtcloud installation?

aa1121 commented 4 years ago

in host: debian, in vm ubuntu

catborise commented 4 years ago

i try every installation method like vagrant, docker and normal. all of them works as expected. what causes you problem, i do not know. may be you can try these methods: https://github.com/retspen/webvirtcloud/wiki

aa1121 commented 4 years ago

I can now access the web interface by connecting to the remote ip address, but if i try to connect through localhost using port forwarding, it still gives me issue where css doesnt load... I found a workaround for that though, i run this command on the remote machine "python /srv/webvirtcloud/manage.py runserver 0:8001 --settings=webvirtcloud.settings-dev" and connect to localhost:8001 on the local machine, with port forwarding enabled. This way, css loads

aa1121 commented 4 years ago

well never mind, this doesnt work for me anymore, i'll try to get it working again and then i'll update with instructions

aa1121 commented 4 years ago

ok, these are the instructions that worked for me in order to get it working through localhost using port forwarding, with css loading

cd /srv/webvirtcloud source venv/bin/activate python /srv/webvirtcloud/manage.py runserver 0:8002 --settings=webvirtcloud.settings-dev

you might need root access or not, depending on permissions