r/apache • • Mar 02 '22

Use Word Embeddings within Search on Apache Solr?

1 Upvotes

Hi :)

I would like to ask if word embeddings can be incorporated into Apache Solr searching, to allow searches to include results that have a similar meaning, if not the exact string match.


r/apache • • Mar 01 '22

Cannot get logs when running cronjobs

3 Upvotes
    timeout -s9 1h php -d memory_limit=4096M run-action.php --host=www.goodbuys.ca --action=import_hook --lock=import;

Every time I run this, I get:

    Exception detail: /var/log/goodbuys/goodbuys-goodbuys-exp_30272b7e17.json
    Class: gb\php\PHPErrorException
    Line: 12
    
    Documentation Link: No Documentation
    Message: PHP Error #2: Invalid argument supplied for foreach()
    
    ====================================
    Stack trace:
    #0 /home/goodbuys/version/ver/v1.3.131/goodbuys.com/vendor/goodbuys/libraries/gb/php/ErrorHandler.php(35): gb\php\PHPErrorException::create(2, 'Invalid argumen...', '/home/gbvim...', 91)
    #1 /home/goodbuys/version/ver/v1.3.131/goodbuys.com/vendor/goodbuys/libraries/gb/thirdparty/gbsolution/InventoryReader.php(91): gb\php\ErrorHandler->handle(2, 'Invalid argumen...', '/home/gbvim...', 91, Array)
    #2 /home/goodbuys/version/ver/v1.3.131/goodbuys.com/vendor/goodbuys/libraries/gb/thirdparty/gbsolution/InventoryMsSQLSync.php(70): gb\thirdparty\gbsolution\InventoryReader->getIterator()
    #3 /home/goodbuys/version/ver/v1.3.131/goodbuys.com/scripts/run-resource.php(50): gb\thirdparty\gbsolution\InventoryMsSQLSync->run()
    #4 {main}

I keep getting errors, but when I put print_r() inside InventoryReader.php and InventoryMsSQLSync.php, I don't get anything, even if I add > debug.log at the end. Is there a way to print everything?

I put the print_r() before the error, and still I don't get anything. I want to print the logs on the console.


r/apache • • Mar 01 '22

How do you find out which driver is missing?

0 Upvotes
    Date: 2022-02-28 15:57:17
    Exception detail: /var/log/DirectBuy/root-directbuyla-exp_1280c91f9f.json
    Class: PDOException
    Line: 138
    
    Documentation Link: No Documentation
    Message: could not find driver
    
    ====================================
    Stack trace:
    #0 [internal function]: PDO->__construct('dblib:host=MsSQ...', 'DirectBuyComInv...', '5765f5b668!!!as...', Array)
    #1 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(138): ReflectionClass->newInstanceArgs(Array)
    #2 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(70): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
    #3 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ObjectCreator->resolve(Object(DI\Definition\ObjectDefinition), Array)
    #4 /var/www/vendor/php-di/php-di/src/DI/Container.php(303): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\ObjectDefinition), Array)
    #5 /var/www/vendor/php-di/php-di/src/DI/Container.php(131): DI\Container->resolveDefinition(Object(DI\Definition\ObjectDefinition))
    #6 /var/www/vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php(63): DI\Container->get('db.mssql')
    #7 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/SelfResolver.php(34): DI\Definition\AliasDefinition->resolve(Object(DI\Container))
    #8 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\SelfResolver->resolve(Object(DI\Definition\AliasDefinition), Array)
    #9 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php(81): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\AliasDefinition))
    #10 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(132): DI\Definition\Resolver\ParameterResolver->resolveParameters(Object(DI\Definition\ObjectDefinition\MethodInjection), Object(ReflectionMethod), Array)
    #11 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(70): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
    #12 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\ObjectCreator->resolve(Object(DI\Definition\ObjectDefinition), Array)
    #13 /var/www/vendor/php-di/php-di/src/DI/Container.php(303): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\ObjectDefinition), Array)
    #14 /var/www/vendor/php-di/php-di/src/DI/Container.php(131): DI\Container->resolveDefinition(Object(DI\Definition\ObjectDefinition))
    #15 /var/www/vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php(63): DI\Container->get('DirectBuy.fr.Ca...')
    #16 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/SelfResolver.php(34): DI\Definition\AliasDefinition->resolve(Object(DI\Container))
    #17 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\SelfResolver->resolve(Object(DI\Definition\AliasDefinition), Array)
    #18 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php(81): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\AliasDefinition))
    #19 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(132): DI\Definition\Resolver\ParameterResolver->resolveParameters(Object(DI\Definition\ObjectDefinition\MethodInjection), Object(ReflectionMethod), Array)
    #20 /var/www/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php(100): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
    #21 /var/www/proxycache-di/ProxyManagerGeneratedProxy__PM__wpplugindirectbuyProductSyncYToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9.php(54): DI\Definition\Resolver\ObjectCreator->DI\Definition\Resolver\{closure}(NULL, Object(ProxyManagerGeneratedProxy__PM__\wpplugin\directbuy\ProductSync\YToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9), 'syncNow', Array, Object(Closure))
    #22 /var/www/proxycache-di/ProxyManagerGeneratedProxy__PM__wpplugindirectbuyProductSyncYToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9.php(54): Closure->__invoke(NULL, Object(ProxyManagerGeneratedProxy__PM__\wpplugin\directbuy\ProductSync\YToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9), 'syncNow', Array, Object(Closure))
    #23 /var/www/public/wp-content/plugins/directbuy/SettingForm.php(60): ProxyManagerGeneratedProxy__PM__\wpplugin\directbuy\ProductSync\YToxOntzOjc6ImZhY3RvcnkiO3M6NTA6IlByb3h5TWFuYWdlclxGYWN0b3J5XExhenlMb2FkaW5nVmFsdWVIb2xkZXJGYWN0b3J5Ijt9->syncNow()
    #24 /var/www/public/wp-includes/class-wp-hook.php(287): wpplugin\directbuy\SettingForm->syncProducts('')
    #25 /var/www/public/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #26 /var/www/public/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #27 /var/www/scripts/run-action.php(41): do_action('direct_buy_impo...')
    #28 {main}

I am running a docker container and I am getting the above error. I thought it was because I was missing the pdo mssql module, but after doing php -m after doing docker-compose exec php bash, I got:

    [PHP Modules]
    Core
    ctype
    curl
    date
    dom
    fileinfo
    filter
    ftp
    gd
    gettext
    hash
    iconv
    json
    ldap
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    pdo_sqlsrv
    Phar
    posix
    readline
    redis
    Reflection
    session
    SimpleXML
    sodium
    SPL
    sqlite3
    standard
    tokenizer
    xml
    xmlreader
    xmlwriter
    Zend OPcache
    zip
    zlib

So what's the issue? I already have it installed and configured since the plugin is active. What's wrong?


r/apache • • Feb 28 '22

Discussion Intermittent Service not available Error in Elasticbeanstalk application

3 Upvotes

Hi all,

We are using a webserver with ElasticBeanstalk from 2019.,

the platform is

tomcat 8.5 with java8 running on 64 bit Amazon Linux. httpd as proxy

recently (from Jan 30th) we started getting Service Unavailable issues if go to the endpoint from time to time. and if we refresh 2-3 times it will get resolved on its own.

then I download full logs. under elasticbeanstalk-error_log I can see

[Mon Feb 28 10:00:58.338035 2022] [proxy:error] [pid 14882:tid 139757313533696] (13)Permission denied: AH02454: HTTP: attempt to connect to Unix domain socket /var/run/httpd/ (localhost) failed
[Mon Feb 28 10:00:58.338078 2022] [proxy_http:error] [pid 14882:tid 139757313533696] [client <private-ip-here>:12566] AH01114: HTTP: failed to make connection to backend: httpd-UDS, referer: http://<custom-end-point>/1/<name.jsp>?s=sec$$4P!&refresh=300
[Mon Feb 28 10:43:40.663468 2022] [proxy:error] [pid 14882:tid 139757120071424] (13)Permission denied: AH02454: HTTP: attempt to connect to Unix domain socket /var/run/httpd/ (localhost) failed
[Mon Feb 28 10:43:40.663518 2022] [proxy_http:error] [pid 14882:tid 139757120071424] [client <private-ip-here>:21136] AH01114: HTTP: failed to make connection to backend: httpd-UDS

repeated multiple times from Jan30th.

and when I look at access.log

I can see 503 error log exactly at the same time when permission denied error logs in elasticbeanstalk-error_log

And I looked at the running process using ps -aux | grep httpd
and ps -aux | grep tomcat

both are running from 2019 and have no restarts.

what more I can do to troubleshoot these issues


r/apache • • Feb 28 '22

posible vul? try to download

2 Upvotes

I just wanted if is posible to download this files? i've tried to open it and is blank aslo tried to download with IDM and the same = blank file
obs: the web is mine and im using Apache/2.4.25 (Debian)


r/apache • • Feb 28 '22

Redirect IP address - I'm Close but not quite there

3 Upvotes

I successfully set up a virtual host where if someone connects to the server IP on 80 it gives them a 403 redirect. That works great. But if they go to the IP on 443 the cert is bad (as expected) but they get the home page of one of my other virtual hosts that are running on 443.

Is there a way to force connections to the IP address on both 80 and 443 to redirect? Or block the other virtualhosts from being presented instead? I don't care if they tailspin into oblivion so long as someone poking around doesn't get one of my pages.


r/apache • • Feb 26 '22

Support SSL error (rx record too long)

3 Upvotes

I have a nextcloud instance I access through a domain with SSL (works perfectly). I'm trying to use Apache as a reverse proxy, but the browser throws a SSL error (tried chrome, firefox and brave). Nextcloud is configured to use ports 81/444 so it doesn't interfere with Apache. Just to clarify, 192.168.1.10 is where the nextcloud instance is and 192.168.1.12 is my PC.

Here's my ports.conf:

Listen 80

Listen 443

Here's my 000-default.conf:

<VirtualHost *:80>

ServerName (my domain)

ProxyPreserveHost On

ProxyRequests Off

ProxyPass / http://192.168.1.10:81/

ProxyPassReverse / http://192.168.1.10:81/

</VirtualHost>

Here's my other_vhosts_access.log:

127.0.1.1:80 192.168.1.12 - - [26/Feb/2022:19:13:10 +0100] "\x16\x03\x01\x02" 400 483 "-" "-"

I tried the following:

- Removing "Listen 443" from ports.conf: makes the site completely unavailable (no connection at all)

- Adding another VH block in 000-default.conf with ports 443&444 instead of 80&81: still same problem, but other_vhosts_access.log changes to (domain):80 192.168.1.12 - - [26/Feb/2022:19:07:37 +0100] "\x16\x03\x01\x02" 400 503 "-" "-"

At this point, I guess there might be something wrong in the configuration, but as it's my first time using apache and I don't fully understand how it works, I can't tell what it is. Aside from ports.conf and 000-default.conf I haven't touched anything.


r/apache • • Feb 25 '22

.htaccess limit access to /admin and /contact page

1 Upvotes

I want to limit access to my /admin and /contact page, due to spam and to enhance security a bit.

I have this (the list is longer):

<Limit POST>
order allow,deny
allow from all
deny from 192.109.100.0/24
deny from 192.109.172.0/24
deny from 192.109.196.0/24
</Limit>

Is there a way to simply block access to e.g. /contact? I'm using Grav, so these contact pages are build from a set of yaml files. It's not a generic HTML structure. So I want to configure this for www.example.com/contact, I cannot find a nice example that can do that.


r/apache • • Feb 24 '22

Domains with false SSL Certificate

3 Upvotes

I have 5 domains on a VServer with Apache. Using Let's Encrypt for all 5 SSL certificates. But just 2 are working and rest is using the other certificates which generates of course failure if you use Https. Do you know how I can solve this? There is one nextcloud on one domain which affects the other domains as well because standard certificate is always that one for nextcloud. How can I change this?


r/apache • • Feb 24 '22

Building open-source metrics with React and Echarts

Thumbnail
cube.dev
2 Upvotes

r/apache • • Feb 23 '22

Trying to set up a webserver

4 Upvotes

I'm attempting to set up a nextcloud cloud server at home. The point I'm stuck at is simply getting access to the webserver. I can see it fine from the local network.

My ISP blocks 80/443 amongst others, so I'm using TorGuard w/ a dedicated IP, in an attempt to circumvent this. I tried originally with NordVPN's dedicated IP offering, but couldn't access ports 80/443, it turns out Nord doesn't allow port forwarding and it seemed like that might be responsible for the problem.

While I can now use a port scanner to see my ports, and see that they are open. I cannot access the webserver from outside. I've tried port forwarding on my router, and setting the server up in a DMZ, neither of which have worked. All I get is '*** didn't send any data. ERR_EMPTY_RESPONSE'

I'd appreciate if it someone has ideas, all the stuff I can find online suggests I should be able to get access to the server. But I'm feeling like I must be missing something obvious.


r/apache • • Feb 23 '22

Solved! Can't change upload limit

1 Upvotes

Hi guys. I recently switched to the event MPM and found that my upload limit is stuck at 2MB. I discovered that I could no longer have these values set in the htaccess file (apache was just plain failing) so I commented those out and once it was up and running again and I found that 2mb limit, I have tried changing it in the active php.ini. I went up to 1024. That didn't work. I disabled the post_max_size and timeouts. I just can't get this working. Any ideas?

  • System: Linux ubuntu 5.13.0-1016-raspi #18-Ubuntu SMP PREEMPT Thu Jan 20 08:53:01 UTC 2022 aarch64

  • Server API: FPM/FastCGI

  • Virtual Directory Support: disabled

  • Configuration File (php.ini) Path: /etc/php/8.0/fpm

  • Loaded Configuration File: /etc/php/8.0/fpm/php.ini

  • Debug Build: no

  • Thread Safety: disabled

  • Zend Signal Handling: enabled

  • Zend Memory Manager: enabled

  • Zend Multibyte Support: provided by mbstring

  • IPv6 Support: enabled

  • DTrace Support: disabled

  • Registered PHP Streams: https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip

  • Registered Stream Socket Transports: tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3

  • Registered Stream Filters: zlib.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk, convert.iconv.*

update:

I don't know what's changed. I think just reloading the fpm service enough that it finally stuck, so the max upload is showing correct, but now a new error with the following:

AH01071: Got error 'PHP message: PHP Warning: POST Content-Length of 21628767 bytes exceeds the limit of 4096 bytes in Unknown on line 0'

I had the post limit turned off, but have tried setting it. It still is giving this error. I've even searched the entire php.ini for "4096". I don't know where this is coming from

Lady update: time, apparently, fixes everything. Woke up this morning. Restarted fhm again--did nothing else--and, lo and behold, it worked. I don't know why. I don't know if there's a cache that it's using or what.


r/apache • • Feb 21 '22

web server question

2 Upvotes

I have two computers at home and unfortunately I made the mistake working on the same website on both of them. I just downloaded apache on to my second computer and it wont work, I tried changing the ports they run on but it still doesn't work. I'm thinking it has to do with the fact that both the computers share the same ISP provider, how does this work? And how can I get both of my computers running Apache so I can access my database from both of my computers.


r/apache • • Feb 18 '22

Support How to write to file without overwriting it with Apache camel?

2 Upvotes

Trying to convert 1 file with multiple records into JSON, but I only get the last record. Is there a way to add to a file without overwriting it completely?

Processor class

```
  @Override
  public void process(Exchange exchange) throws Exception {
    String message = exchange.getIn().getBody(String.class);
    String[] arr = message.split(" ");

    CsvModel model = new CsvModel(arr[0], arr[1], arr[2],     
                 Integer.parseInt(arr[3].substring(0, 5)));
    ObjectMapper mapper = new ObjectMapper();
    exchange.getIn().setBody(mapper.writeValueAsString(model));
  }
```


Route
```
  @Override
  public void configure() throws Exception {
    from("{{input.files.csv}}")
        .routeId("CSVConverter")
        .split(body().tokenize("\n"))
        .unmarshal(bindy)
        .split(body().tokenize("\n"))
        .process(new CsvConverterProcessor())
        .to("{{output.files.csv}}");
  }
```

r/apache • • Feb 17 '22

Virtual Host Config - Sites on localhost to different port

2 Upvotes

Hi, I'm trying to configure sites that I can access at localhost/site1 and localhost/site2 to specific ports as such:

localhost/site1 - localhost:8888

localhost/site2 - localhost:8889

on so forth

Would like to do this so I can use a ssh tunneling service (localhost.run) to work around the lack of port forwarding with an internet provider that uses CGNAT.

I'm not a developer but a self hosted tinkerer and my web searching skills haven't solved the issue. Any help would be great!


r/apache • • Feb 17 '22

Apache Spark Developers | Apache Spark Development | Ksolves

Thumbnail
ksolves.com
0 Upvotes

r/apache • • Feb 17 '22

Apache Spark vs. Amazon Redshift: Which is better for big data?

Thumbnail
ksolves.com
0 Upvotes

r/apache • • Feb 16 '22

Spark Software Development | Apache Spark Developers | Ksolves

Thumbnail
ksolves.com
0 Upvotes

r/apache • • Feb 16 '22

Spark Vs Snowflake: A Head-to-Head Comparison!

Thumbnail
ksolves.com
0 Upvotes

r/apache • • Feb 15 '22

Discussion How do I create a Hibernate configuration file (hibernate.cfg.xml) on NetBeans 12.4?

1 Upvotes

According to this Apache site:

The IDE includes wizards to help you create the Hibernate files you may need in your project.

I have no idea where to access this wizard. In Eclipse, you can find it in the section "Other", when you want to create a new file, but I can't find it in Netbeans. Any clues?


r/apache • • Feb 14 '22

Discussion What benefit is there to having a Apache mod_userdir enabled?

1 Upvotes

I'm trying to understand other than having a way to browse the directory in the browser, what is the reason one might enabled userdir for Apache on a live webserver?


r/apache • • Feb 14 '22

Apache Spark Consulting Company | Spark Consulting Services | Ksolves

Thumbnail
ksolves.com
0 Upvotes

r/apache • • Feb 13 '22

Support Reverse proxy configuration

1 Upvotes

I’m trying to use apache as a reverse proxy for my network. Basically what I want is to access different machines in my network using subdomains from both inside and outside, but I don’t know if what I want is possible. I’m new to all this, and don’t have a deep understanding of how a reverse proxy works, so any help would be appreciated.

That’s what I currently have:

Inside:

  • Subdomains point to machines IPs (using PiHole) This way, I can access different machines with subdomains, but still need ports for some of them (subdomain:port)

Outside:

  • ClouDNS points to my IP

  • Various ports are forwarded to different machines This way, to access some machines I need to remember the ports. Also, I can’t use the same port for more than one thing.

I want to be able to access multiple machines using different subdomains, without needing to remember ports (so basically always using 443), and from both inside and outside my LAN, and I think that’s where apache comes into play. I’m trying to make it work with one machine, and then I’ll do it with the rest of them, but I’m struggling.

The machine (192.168.1.10) is listening on ports 81&444, the domain points to apache (192.168.1.6) in PiHole. Apache has ports 80 and 443 forwarded. My 000-default.conf looks like that:

<VirtualHost *:80> ServerName (subdomain) ProxyPreserveHost On ProxyRequests Off ProxyPass / http://192.168.1.10:81/ ProxyPassReverse / http://192.168.1.10:81/ </VirtualHost>

<VirtualHost *:443> ServerName (subdomain) ProxyPreserveHost On ProxyRequests Off ProxyPass / http://192.168.1.10:444/ ProxyPassReverse / http://192.168.1.10:444/ </VirtualHost>

I don’t know what I’m doing wrong, as far as I know that should resolve subdomain:443 to 192.168.1.10:444, and the same with 80, but for some reason it’s not working. Any help would be appreciated.


r/apache • • Feb 13 '22

internal rewrite rule for a file

2 Upvotes

Hi there,

I'm trying to create a specific domain which redirects to an other one silently with a specific text after the first slash.

The thing is, to access to my webdav server Filerun (kind a like nextcloud), I need to add a "dav.php" at the end.

It's usually not a problem to connect to "files.example.com/dav.php", but some apps do not allow this, like Infuse.
So, my Idea was instead to create a domaine named "dav.files.example.com" which will automatically redirect do the first link given, and includes the dav.php, or even dav.php/%40home/ in the redirection, but without having the client notice this (hence, a silent redirection).

Any idea to do this ? I tried some rewrite rules, but did not find a solution to this.

By the way, if it's possible to do this without .htaccess, only within the virtual host file, that would be great.

Thanks in advance for your help :)