Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter linch1

    (@linch1)

    Thanks for the reply @hemant-ahir your code snippet correctly works, also i figured out that the problem was in changing the headers.
    I mean I don’t understand why if i try to change set for example
    $headers = array( 'asd' => 'asd' );
    or
    $headers = array( 'origin' => 'localhost' );
    the request sends an empty body.

    Edit: I’m wrong i was missing the
    'Content-Type' => 'application/json'

    • This reply was modified 5 years, 4 months ago by linch1.
    • This reply was modified 5 years, 4 months ago by linch1.
    Thread Starter linch1

    (@linch1)

    @kgagne ok thanks for the suggestion. I was thinking to add some specific tags with all the same prefix (that marks them as custom link) in the name like [link] tag1 and adding a link in the description field when creating the tag.
    When i would have to render the tags i would add a logic like this

    
    tags = get_tags();
    for each tag:
       if ( tag starts with [link] ){
          tag_real_name = (tag->name) without the first 6 letters
          add a link with the href="tag->descritpion"
       }
    

    i think that this is an easiest approach but do you think that your suggestion is better?

    • This reply was modified 5 years, 6 months ago by linch1.
    • This reply was modified 5 years, 6 months ago by linch1.
    Thread Starter linch1

    (@linch1)

    Finally i solved this, I made an SSL certificate for my website using let’s encrypt certbot, This script created a new virtualhost in another file for the https requests ( called /etc/apache2/sites-available/myDomain-le-ssl.conf ) That virtualhost was overriding my proxypass directive, editing also this virtualhost made all work

    Thread Starter linch1

    (@linch1)

    Thanks for the suggestion, I updated the config as you said but unfortunately still get the wordpres 404 not found page

    
    <VirtualHost *:80 *:443>
    
        ServerAdmin [email protected]
        ServerName yourluxuryroad.com
        ServerAlias www.yourluxuryroad.com
        DocumentRoot /var/www/yourluxuryroad
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
        RewriteEngine on
        RewriteCond %{SERVER_NAME} =www.yourluxuryroad.com [OR]
        RewriteCond %{SERVER_NAME} =yourluxuryroad.com
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    
        ProxyPreserveHost On
        ProxyRequests Off
    
        <Location "/node-yrl-book">
            ProxyPass http://localhost:5000
            ProxyPassReverse http://localhost:5000
        </Location>
    
    </VirtualHost>
    
    <Directory /var/www/yourluxuryroad/>
        AllowOverride All
    </Directory>
    
    • This reply was modified 5 years, 8 months ago by linch1.
    Thread Starter linch1

    (@linch1)

    I have update the config as following becouse the upper one was wrong, but still got the same issue

    
    <VirtualHost *:80 *:443>
    
        ServerAdmin [email protected]
        ServerName yourluxuryroad.com
        ServerAlias www.yourluxuryroad.com
        DocumentRoot /var/www/yourluxuryroad
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
        RewriteEngine on
        RewriteCond %{SERVER_NAME} =www.yourluxuryroad.com [OR]
        RewriteCond %{SERVER_NAME} =yourluxuryroad.com
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass /node-yrl-book http://localhost:5000
        ProxyPassReverse /node-yrl-book http://localhost:5000
    
    </VirtualHost>
    
    <Directory /var/www/yourluxuryroad/>
        AllowOverride All
    </Directory>
    
    
Viewing 5 replies - 1 through 5 (of 5 total)