Jump to content

ajoo

Members
  • Posts

    871
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by ajoo

  1. hmmm, I forgot to mention that the length of the column was 60 and i increased it to like 150  and then to 255 and it did not work,

    But ofcourse you are still right Requinix, on both counts. I had made changes in the wrong table. It's working now !! is 150 a good enough length for an email  or should it be all the way up to the varchar limit?

    Thanks !

     

  2. Hi all !

    I am using mysql version 5.7.24 and I have run into the error under heading. 

    The length of the email in question is 33 as given by select  

    char_length('shiningstarstruste11111@gmail.com');

    Most of the suggestions are to turn the strict mode off which I don't want to do. 

    What would be the best way to resolve this ?

    Thanks !

  3. Hi Requinix !

    Some correction and some more info here in the new diag.

    image.png.623a5c01416c6c048c6fc5fd8d210008.png

    PC1 is a windows machine.

    The VM's MASTER and SERVER get their static IP addresses from the vagrant file wherein they are set. 

    PC1 and PC2 have the IP addresses as shown. PC2 is connected via lan and PC1 via wifi to the modem. 

    The zone setting of VM SERVER is DMZ. I chose it to be DMZ since I thought that would be appropriate for the local network. The services running on VM SERVER are ssh and http. port 80 is open. See below.

    dmz (active)
      target: default
      icmp-block-inversion: no
      interfaces: eth0 eth1
      sources:
      services: http ssh
      ports: 3306/tcp 80/tcp 443/tcp
      protocols:
      masquerade: no
      forward-ports:
      source-ports:
      icmp-blocks:
      rich rules:
     

    15 hours ago, requinix said:

    Does the VM Server have its port 80/443 exposed publicly?

    The settings do expose the ports but I wonder if they are required as the site is to be accessed only locally.

    I hope this can help you and other to suggest a workable solution for me to try out. 

    Thanks loads !

     

     

  4. Hi !

    I have the following setup in my office ! ( small office 🙂)

    image.png.9833ac53117738f5b6cdd8eb40dcdf68.png

    PC2 is connected to the network via cable. PC1 is connected via wifi. The ip addresses are as shown. VM Master and VM Server are created via vagrant. VM server serves the website which I can access on PC1. The host entry on widows is 192.168.2.32 mysite.com. I tried to access the website on PC2 using a same entry in the hosts file on PC2, but I am unavle to access my website on PC2. 

    Please can someone suggest what must I do to be able to access mysite.com on PC2 as well as any other machine on the N/W.

    Thanks loads !   

     

  5. Hi Kicken !

    Thanks for the response. I have done something like what you are suggesting and it works. However I was wondering, since it would be a common issue with AJAx calls, that there would be maybe a "proper" way of handling blank strings that need to be interpreted as arrays on php side of things. 

    Though my code works but does seem a bit of a hack.

    Thanks again.

  6. Hi requinix, 

    Yes I am running apache but xsendfile isn't a native module. If it can be installed, then how can it be installed? I don't see the module files on laragon as i generally do on a VM. I think it has modules compressed into an so or something. I am not sure. Please see below the contents of the modules folder in laragon at etc/apache/modules .

    image.png.96adbd40ac06358c5a0684137b36e8be.png

    Thanks !

       

  7. Thanks requinix, 

    image.png.80fefc2c872b257df1a1ffb1db4a94d7.png

    So while I got this working, strangely I still have   

    httpd -t -c httpd.conf give the following :-

    image.thumb.png.06d396687ccf6bea1675498470eaf701.png

    and the file at image.png.b45b1af272339e1f7904d4118f9993be.png

     is neither empty nor missing and is also the right format. Incidentally, this same certificate I used in my windows 10 that gave the lock.

    image.png.83c0d62f174530608b8bfe07c97fe868.png

    Also shouldn't a syntax error cause the server to not restart or reload? 

    Any suggestions how this can be further invetigated? Anything else that I look into ? My logs, all of them are set to warn and were totally clear. 

    Thanks loads ! 

  8. Hi !

    SO i got the certificate to my windows machine and installed it. The hosts file on the machine has an entry for my locally hosted website. And while I got the padlock I got a 404 error message. 

    image.png.2d4e5e532f7861db6ba168d035f6bec0.png

     

    I'ld like to mention that I am using vagrant to spin up 2  machines for me, a host and a server.  I then use the host to setup the server using ansible. Thus my server is twice removed from my windows machine. I then copied the keys as suggested by requinix from the server to my windows machine and got the result shown above. 

    I hope someone can suggest what issues could be causing this 404 error.

    Thanks !

     

  9. Hi Kicken, 

    Thanks for the reply. 

    I have a VM instance on my computer so that makes the VM to be another computer. The certificates and the key are on the VM hosting the site as that's how they are placed by default there when they are be installed. Possibly the certificate, which i believe holds the key, needs to be uploaded to the main machine from where I browse the site and installed there as well for selfsigned certificates though I don't know for sure and I don't know where. Possibly in the trusted certificates somewhere in the control panel and possibly in the browser too. 

    Maybe you can confirm or refute some of the points I make above. Thanks !    

  10. Quote

    IIRC you take the public key

    😕 so which is the public key !? surely you woudn't be referring to the public key of the server ?? where and how to install it on the computer ?

    Meanwhile I looked up another certificate issuer that professes to be there only for the localhost testing as of now, namely mkcert. It comes bundled with the trust authority and is easily installed. It is, except that the end result was still the same. Chrome did not accept and gave the same error as before. 

    Sorry if my questions are too noobish but this is totally new to me.

    Thanks ! 

  11. Hi requinix !!

    Thanks for the response ! I hope you are doing good. 

    I have already read up on what you mention but i it's confusing.

    I have already generated a selfsignied certficate. On my VM localhost I have the following so far:

    At /etc/pki/tls/certs/ testnode.csr, testnode.pem, testnode.conf and testnode.combined.pem

    At /etc/pki/tls/private/testnode.key 

    Quote

    You can download and store the public key on your computer and tell it to trust that

    So do i need to download /etc/pki/tls/private/testnode.key from the VM onto my host computer ? On some of the questions answered on stack exchange, the mention a key like root_CA.key / root_CA.pem I don't know if that is the key you are talking about. I don't see that being generated on my computer.

    Quote

    Or you can create a certificate signing authority, trust that

    How can I do this ? Maybe a thread or an article / tutorial on this that you can point to. I'ld be happy. 

    I will try out the Letsencrypt bit later with an actual domain.

    Thanks loads and keep safe. 🙏

     

     

  12. The following is the error that In have been receiving. 

    Quote

    Your connection is not private

    Attackers might be trying to steal your information from testnode.dev (for example, passwords, messages, or credit cards). Learn more

    NET::ERR_CERT_AUTHORITY_INVALID

    Hopefully someone can suggest something.

    Thanks !

  13. Hi all !

    I have been trying to use selfsigned cerificate on my VM for testing. I have tried to do so by following the tutorial here and with utter failiure. No matter what I try, the selfsigned certificate simply won't change the URL bar to the safe green. I always end up with the "your connection is not private" message. The URL says not secure instead of the green padloc and the https is crossed out by 2 lines. it leaves me wondering if selfsigned certficates are not accepted by chrome or firefox any longer. Has anyone else suffered from a similar problem and can have some words of advice for me ! 

    Thanks loads !! 

      

  14. HI, 

    I have been trying to create a passwordless user using Ansible. However it fails at the point where the SSH key is to be placed. 

    Below is the playbook that I am using.

    Text

    ---
    
    - hosts: test1
      become: yes
      tasks:
        
      - name: Make sure we have a 'wheel' group
        group:
          name: wheel
          state: present
    
      - name: Allow 'wheel' group to have passwordless sudo
        lineinfile:
          dest: /etc/sudoers
          state: present
          regexp: '^%wheel'
          line: '%wheel ALL=(ALL) NOPASSWD: ALL'
          validate: 'visudo -cf %s'
      
      - name: Add sudoers users to wheel group
        user: 
          name: "adminn"
          groups: wheel 
          append: yes 
          state: present 
          createhome: yes
      
      - name: Set up authorized keys for the adminn user
        authorized_key: 
          user: adminn 
          key: "{{ item }}"
        with_file:
          - /home/vagrant/.ssh/id_rsa.pub

     

    which ends giving the following error.

     

    Quote

    PLAY [test1] *************************************************************************************************************************

    TASK [Gathering Facts] ***************************************************************************************************************
    ok: [test1]

    TASK [Make sure we have a 'wheel' group] *********************************************************************************************
    ok: [test1]

    TASK [Allow 'wheel' group to have passwordless sudo] *********************************************************************************
    changed: [test1]

    TASK [Add sudoers users to wheel group] **********************************************************************************************
    changed: [test1]

    TASK [Set up authorized keys for the adminn user] ************************************************************************************
    fatal: [test1]: FAILED! => {"changed": false, "msg": "Either user must exist or you must provide full path to key file in check mode"}
            to retry, use: --limit @/vagrant/ansible2/playbook.retry

    PLAY RECAP ***************************************************************************************************************************
    test1                      : ok=4    changed=2    unreachable=0    failed=1
     

    I have set up the system using vagrant wherein i have a control and node server with default user vagrant that already has a passwordless access from control to the node. This is a new user that I wish to create.

    I referred to this article .

    Hoping that someone can help me resolve this error. 

    Thanks all !

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.