我正在为Mantis BT运行网络服务器。我在笔记本电脑上配置了测试阶段。我手动创建的用户会收到初始注册的URL。他们只能通过用我的笔记本电脑名称替换URL中的localhost来连接我。有没有办法用MySQL中的机器名替换localhost?
答案 0 :(得分:1)
在config_inc.php中设置g_path。例如:
#!/bin/sh
alias curl="curl -s"
echo "Delete index"
curl -X DELETE "localhost:9200/products?pretty"
echo
echo "Create index"
curl -X POST "localhost:9200/products?pretty" -d '
{
"products" : {
"settings" : {
"index" : {
"analysis" : {
"filter" : {
"my_synonym" : {
"ignore_case" : "true",
"expand" : "true",
"type" : "synonym",
"synonyms" : [ "pote, foundation"] }
},
"analyzer" : {
"folding_analyzer" : {
"filter" : [ "standard", "lowercase", "asciifolding", "my_synonym" ],
"tokenizer" : "standard"
}
}
},
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
},
"mappings" : {
"product" : {
"dynamic" : "false",
"properties" : {
"brand_name" : {
"type" : "string",
"index_options" : "offsets",
"analyzer" : "folding_analyzer"
},
"product_name" : {
"type" : "string",
"index_options" : "offsets",
"analyzer" : "folding_analyzer"
}
}
}
}
}
}
'
echo
echo "Info index"
curl -XGET 'localhost:9200/products/_settings,_mappings?pretty'
echo
echo "Test doc:"
curl -X POST "localhost:9200/products/product/1?pretty" -d '{
"product_name": "Foundation Brush",
"brand_name": "Bobbi Brown"
}'
echo
echo "Test doc:"
curl -X POST "localhost:9200/products/product/2?pretty" -d '{
"product_name": "Foundation Primer",
"brand_name": "Laura Mercier"
}'
echo
echo "Test doc:"
curl -X POST "localhost:9200/products/product/3?pretty" -d '{
"product_name": "Lock-It Tattoo Foundation",
"brand_name": "Kat Von D"
}'
echo
echo "Test doc:"
curl -X POST "localhost:9200/products/product/4?pretty" -d '{
"product_name": "Diorskin Airflash Spray Foundation",
"brand_name": "Dior"
}'
echo
echo "Test doc:"
curl -X POST "localhost:9200/products/product/5?pretty" -d '{
"product_name": "Diorskin Airflash Spray Lancôme",
"brand_name": "Dior"
}'
echo
echo "Info index"
curl -XGET 'localhost:9200/products/_settings,_mappings?pretty'
echo
echo "Search all"
curl -X GET "localhost:9200/products/_search?pretty" -d '{
"query": {
"match_all": {}
}
}'
echo