Categories
Mastering Development System & Network

Multiple domains and multiple php-fpm pools conflicting

For some reason when running multiple domains/vhosts it is conflicting and it does not pass the relevant PHP pool? Now I have created two maps.conf as each domain will have multiple domains/stores. Now the issue is domain1 using xxxxx pool and when I var_dump $params = $_SERVER; var_dump($_SERVER); exit; For domain1 it returns the following: […]

Categories
Mastering Development

URL get a 404 with Python request while working in the browser

I have a crawling python scripts that hangs on a url: pulsepoint.com/sellers.json The bot uses a standard request to get the content, but is answered 404. In the browser it works (there is a 301 redirect, but request can follow that). My first hunch is that this could be a request header issue, so I […]

Categories
Mastering Development

what do we call this type of data and can we make a reauest using it

I’m developing a proxy and I came across this problem where I can’t resend the request and get the HTML output(ofc I thought about splitting and these things but it won’t help later) GET http://www.example.com/ HTTP/1.1 Host: www.example.com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate […]

Categories
User Help

OperationalError at /admin/products/product/add/ no such table: main.auth_user__old DJANGO [closed]

main.auth_user__old in django tutorial going through mosh created a web server.When saving some polls or products or set i get this error instead of going to be saved on the site. Heres the error OperationalError at /admin/products/product/add/ no such table: main.auth_user__old Request Method: POST Request URL: http://127.0.0.1:8000/admin/products/product/add/ Django Version: 2.1 Exception Type: OperationalError Exception Value: […]

Categories
Mastering Development

python handling incoming from url

i’m sending below request to URL and get the response from it import requests url = “http://localhost/dat.txt” payload = {} headers = { ‘Upgrade-Insecure-Requests’: ‘1’, ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36’, ‘Sec-Fetch-Dest’: ‘document’, ‘Accept’: ‘text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9’ } response = requests.request(“GET”, url, headers=headers, data = payload) print(response.text.encode(‘utf8’)) Below is the […]

Categories
Mastering Development

I can not log in to the site through curl

I can’t understand what I’m doing wrong. There is a service site: https://demo.moneta.ru/login.htm. The usual form with a token. I knock on the page, save the cookies, take the token from the form. The next request I send to the address from the form data. With cookies and token. I get a fig. 401. I […]

Categories
Development System & Network

ModSecurity 3 – POST hitting rule 2x and getting 403 while GET only 1x (no 403)?

Doing some testing on site I’m working on (without a name/domain currently which is TBD). I can HTTP GET resources fine, although ModSecurity throws warnings that my request hostname was only IP Address (fine for me for now) in it’s logs. However, when I POST to one of my API’s, the call is getting rejected […]

Categories
Development System & Network

Why don’t I see the TCP handshake in the HTTP server?

When I create a simple http server (a socket listening to a port) I don’t see the actual TCP handshake taking place. Why is that? Why is it hidden from me? For example if I start a server on port 9822 like this: nc -l 9822 And then I open my web browser and go […]

Categories
Development

Why Rails fails to detect AJAX request in production?

I am using rails 5.2.4.1, and I am wondering why I get this error when I try to access the API endpoint: ActionView::MissingTemplate (Missing template api/schools/classrooms, application/classrooms with {:locale=>[:en], :formats=>[:json], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :haml]}. here is my action: def classrooms render json: {classrooms: user.daip.class_rooms.as_json(:include => [:users]), max_classrooms: user.daip.classrooms} , content_type: ‘application/json’ end […]

Categories
Development System & Network

Nginx proxy weebly site show weebly 404 error

I’m pretty new to Nginx and I’m currently trying to proxy a weebly website (https://ldmryeah.weebly.com/) over Nginx which act as a reverse proxy. However after several attempt all I’ve got is the default Weebly’s 404 page. Below are some of the configurations that I tried: # most basic one location /weebly { proxy_pass $WEEBLY_ENDPOINT; } […]