#(DerQualle) Webserver not working

37 messages · Page 1 of 1 (latest)

storm mist
#

Hey , I made a simple webserver by basically copy pasting from the docs. But I cant reach the website. Any Idea what might be going on here?
The console gives no errors at all. All I get is: [04:29:07 INFO]: Webserver at port 8081 started.

    type: command
    debug: true
    name: serverstart
    description: Start Server
    usage: /serverstart
    script:
    - webserver start port:8081

webserverend:
    type: command
    debug: true
    name: serverend
    description: Stop Server
    usage: /serverend
    script:
    - webserver stop port:8081


web_server:
    type: world
    debug: true
    data:
        index:
        - <!DOCTYPE html>
        - <html><head><title>Welcome to my site</title></head>
        - <body><h1>Hi!</h1></body></html>
    events:
        on webserver web request port:8081 path:/|/index|/index.html method:get:
        - determine code:200 passively
        - determine headers:[Content-Type=text/html] passively
        - determine raw_text_content:<script.data_key[data.index].separated_by[<n>]>

unkempt fieldBOT
#

(DerQualle) Webserver not working

unkempt fieldBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

zinc flame
#

you accidentally left your event on your data key

#

OH NO i misread

storm mist
#

Just in case, I reformatted:

    type: command
    debug: true
    name: serverstart
    description: Start Server
    usage: /serverstart
    script:
    - webserver start port:8081

webserverend:
    type: command
    debug: true
    name: serverend
    description: Stop Server
    usage: /serverend
    script:
    - webserver stop port:8081


web_server:
    type: world
    debug: true
    data:
        index:
            - <!DOCTYPE html>
            - <html><head><title>Welcome to my site</title></head>
            - <body><h1>Hi!</h1></body></html>
    events:
        on webserver web request port:8081 path:/|/index|/index.html method:get:
            - narrate test
            - determine code:200 passively
            - determine headers:[Content-Type=text/html] passively
            - determine raw_text_content:<script.data_key[data.index].separated_by[<n>]>

#

but it didnt help 😅

kind quartz
#

that extra spacing is worse not better

storm mist
#

oh damn, thats how I have always written my scripts 😄

kind quartz
storm mist
#

localhost

kind quartz
#

what URL did you try opening to access it?

storm mist
kind quartz
#

that is not a localhost url

storm mist
#

oh thats what you mean

#

not localhost then

#

Its the server ip address

kind quartz
#

use localhost for initial testing

#

!guide local

fleet yokeBOT
kind quartz
#

after that if you have trouble with a remote server you know it's a firewall or NAT issue and not a script issue

storm mist
#

Will do. Just out of curiosity, might dynmap interfere with the denizen web server? Even though its running on a different port?

kind quartz
#

shouldn't

storm mist
#

ok, thanks

storm mist
#

So I just run the same server locally and everything works just fine. To test, I disabled the firewall on my remote server for a minute to check if I could access the page, but its still not work. Any other ideas?

storm mist
#

Found the issue. Problem is obviously my incompetence

merry nightBOT
#
Resolved

Thread closed as resolved.

#
Thread Reopened

Thread was manually reopened by @storm mist.

#
Resolved

Thread closed as resolved.

merry nightBOT
#
Thread Reopened

Thread was manually reopened by @nova raven.